We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8051c42 commit b3ac8d9Copy full SHA for b3ac8d9
src/lib/md-to-pdf.ts
@@ -26,6 +26,12 @@ export const convertMdToPdf = async (input: { path: string } | { content: string
26
pdf_options: { ...config.pdf_options, ...frontMatterConfig.pdf_options },
27
};
28
29
+ const { headerTemplate, footerTemplate, displayHeaderFooter } = config.pdf_options;
30
+
31
+ if ((headerTemplate || footerTemplate) && displayHeaderFooter === undefined) {
32
+ config.pdf_options.displayHeaderFooter = true;
33
+ }
34
35
// sanitize array cli arguments
36
for (const option of ['stylesheet', 'body_class']) {
37
if (!Array.isArray((config as any)[option])) {
0 commit comments