Skip to content

Commit

Permalink
Add support for paged.js hooks (closes #512) (#513)
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume Grossetie <[email protected]>
  • Loading branch information
danyill and ggrossetie authored Jun 3, 2021
1 parent cbd45cf commit a263dde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ The scope defines if the docinfo files apply for a specific document ("private")
| ----- | -------- | -------- | ----------------- |
| Private | Head | Adds content to `<head>` for `<docname>.adoc` files. | `<docname>-docinfo-pdf.html` |
| Private | Header | Adds content to start of document for `<docname>.adoc` files. | `<docname>-docinfo-header-pdf.html` |
| Private | Footer | Adds content to end of document for `<docname>.adoc` files. | `<docname>-docinfo-footer-pdf.html` |
| Private | Footer | Adds content to end of document for `<docname>.adoc` files. Useful for supporting [Paged.js hooks and custom JavaScript](https://www.pagedjs.org/documentation/11-hooks/) | `<docname>-docinfo-footer-pdf.html` |
| Private | Running | Adds running content to start of document for `<docname>.adoc` files. | `<docname>-docinfo-running-pdf.html` |
| Shared | Head | Adds content to `<head>` for any document in same directory. | `docinfo-pdf.html` |
| Shared | Header | Adds content to start of document for any document in same directory. | `docinfo-header-pdf.html` |
| Shared | Footer | Adds content to end of document for any document in same directory. | `docinfo-footer-pdf.html` |
| Shared | Footer | Adds content to end of document for any document in same directory. Useful for supporting [Paged.js hooks and custom JavaScript](https://www.pagedjs.org/documentation/11-hooks/)| `docinfo-footer-pdf.html` |
| Shared | Running | Adds running content to start for any document in same directory. | `docinfo-running-pdf.html` |

To specify which file(s) you want to apply, set the docinfo attribute to any combination of these values:
Expand Down
2 changes: 1 addition & 1 deletion lib/document/document-converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ ${this.outline(node, opts)}
${this.tocHeader(node, opts)}
${contentHTML}
${this.footnotes(node)}
${this.docinfoContent(node, 'footer', '-pdf.html')}
${this.syntaxHighlighterFooter(node, syntaxHighlighter, { cdn_base_url: cdnBaseUrl, linkcss: linkcss, self_closing_tag_slash: '/' })}
${this.stemContent.content(node)}
<script>
${this.pagedContent}
${this.pagedRendering}
${this.repeatTableElementsContent}
</script>
${this.docinfoContent(node, 'footer', '-pdf.html')}
</body>
</html>`
}
Expand Down

0 comments on commit a263dde

Please sign in to comment.