photon_platform.publish.book¶
Book subtree inheritance and multi-track context injection for the ‘Website in a Website’ Codex layout.
Attributes¶
Functions¶
|
Peek at the beginning of an RST file to extract top field-list metadata. |
|
Detect companion tracks for pagename in env.found_docs. |
|
Resolve book subtree inheritance and companion tracks for pagename. |
|
Clean up non-book editorial references in source RST when building an EPUB. |
|
Consolidate footnote targets and apply EPUB 3 doctree transformations. |
|
Gracefully degrade excluded website references (e.g. about-*) to plain text in EPUB builds. |
|
Sphinx html-page-context hook to inject Book Codex context and select book_layout.html. |
|
Register the book subtree inheritance and EPUB 3 hooks with Sphinx. |
Module Contents¶
- photon_platform.publish.book.nodes = None¶
- photon_platform.publish.book.peek_metadata(filepath: str) Dict[str, str]¶
Peek at the beginning of an RST file to extract top field-list metadata.
- photon_platform.publish.book.detect_companion_tracks(env: Any, pagename: str) List[Dict[str, Any]]¶
Detect companion tracks for pagename in env.found_docs.
Supports: - Elements 2.0 tracks:
index(Pseudocode),video(Video),code(Code),heath(Heath) - Euclid tracks:index/proposition,commentary,notes,folioor
<pagename>.commentary,<pagename>.notesPacioli tracks:
<stem>_en,<stem>_it,<stem>_de,<stem>_notes,indexHoenen tracks:
<stem>(Latin),<stem>-en,<stem>-summary,translation-notes-<stem>
- photon_platform.publish.book.resolve_book_context(env: Any, pagename: str, doctree: docutils.nodes.document | None = None) Dict[str, Any]¶
Resolve book subtree inheritance and companion tracks for pagename.
- photon_platform.publish.book.filter_epub_book_sources(app: Any, docname: str, source: List[str]) None¶
Clean up non-book editorial references in source RST when building an EPUB.
- photon_platform.publish.book.resolve_book_doctree(app: Any, doctree: Any, fromdocname: str) None¶
Consolidate footnote targets and apply EPUB 3 doctree transformations.
- photon_platform.publish.book.resolve_epub_missing_reference(app: Any, env: Any, node: Any, contnode: Any) Any | None¶
Gracefully degrade excluded website references (e.g. about-*) to plain text in EPUB builds.