dmp-page-meta
v0.2.7
Published
Documark plugin for configuring the header, footer, page margins, and global styles.
Downloads
4
Maintainers
Readme
Documark Page Meta
Documark plugin for configuring the header, footer, page margins, and global styles.
This plugin wraps the content with a doctype
, html
, and body
element.
And sets the charset to UTF-8
in the head
element.
Usage
Add plugin to document configuration:
plugins: - dmp-page-meta
Add header and footer content with:
header .pull-left Header left. .pull-right Header right. center Header center. .clearfix footer .pull-left.section .pull-right= 'Page ' span.page-number = ' of ' span.page-count .clearfix
Optionally add global stylesheets to the front-matter:
stylesheets: - assets/css/style.css
Note that headers, footers, and things like landscape pages are compiled 'separately'. WkHTMLToPDF allows for combining multiple HTML files into one PDF. So these 'global stylesheets' refer to styles that also apply to the entire document.
Note: This plugin globalizes all stylesheets (including the <link type="text/css" href="..." />
elements).
Configuration
These options can be added to your document configuration.
Use the following options to remove the header/footer for certain pages:
hideHeaderOn: 1
hideFooterOn: 1, 3-4, 9-
Use startPageCountOn
to shift the displayed page numbers:
startPageCountOn: 2 # to start counting from page number 2
startPageCountOn: -3 # to skip first four pages, page 5 will now be numbered 1
Let's say you want to skip the first four pages from numbering and hide their headers and footers. You can use this (slightly counterintuitive) configuration for that:
startPageCountOn: -3 # 1 - 4 (number of pages to skip) = -3
hideHeaderOn: -3-0
hideFooterOn: -3-0