jellycell.render.manuscript¶
Manuscript rendering for the live viewer.
Renders any .md file under manuscripts/ as a standalone HTML page
using the project’s template stack. Used by /manuscripts/<path> and
/journal in :mod:jellycell.server.app.
Authored files at the root and auto-generated tearsheets under
tearsheets/ are treated identically at the render layer — the split
is a human / tooling convention, not a rendering one. The
- func:
discover_manuscriptshelper surfaces both groups plus the optional journal entry so sidebars and index pages can link them.
No disk writes: this module is server-only. Static
jellycell render leaves manuscripts alone on purpose — GitHub
renders them natively, and the tearsheet subfolder is designed for that.
Module Contents¶
Classes¶
A single manuscript entry for sidebars and index pages. |
|
Organized view of every |
Functions¶
Walk |
|
Render |
|
Render the |
API¶
- class jellycell.render.manuscript.ManuscriptLink¶
A single manuscript entry for sidebars and index pages.
- class jellycell.render.manuscript.ManuscriptCatalog¶
Organized view of every
.mdundermanuscripts/.- authored: list[jellycell.render.manuscript.ManuscriptLink]¶
‘field(…)’
Root-level hand-authored manuscripts (paper.md, findings.md, etc.).
- tearsheets: list[jellycell.render.manuscript.ManuscriptLink]¶
‘field(…)’
Auto-generated tearsheets under
manuscripts/tearsheets/.
- journal: jellycell.render.manuscript.ManuscriptLink | None¶
None
The journal entry, if one exists (
journal.mdor custom path).
- jellycell.render.manuscript.discover_manuscripts(project: jellycell.paths.Project, *, current_rel: str | None = None) jellycell.render.manuscript.ManuscriptCatalog¶
Walk
manuscripts/and classify each.mdfile.Classification rules:
A file at
tearsheets/*.mdis a tearsheet.The file matching
[journal] path(defaultjournal.md) is the journal — surfaced separately regardless of location.Everything else at the root (or in other subfolders) is authored.
The
README.mdis intentionally treated as authored — it’s a human-written index for the folder.
- jellycell.render.manuscript.render_manuscript_page(project: jellycell.paths.Project, md_rel: str, *, env: jinja2.Environment, pygments_css: str) str¶
Render
manuscripts/<md_rel>(plus sidebar + chrome) into an HTML string.Args: project: Current project — used to read the file + build catalog. md_rel: Path relative to
manuscripts/(e.g.tearsheets/analysis.md). env: Jinja environment from the renderer (reuses loader + filters). pygments_css: Pre-rendered pygments styles so fenced code blocks pick up the site theme when the markdown includes them.Raises: FileNotFoundError: If
<manuscripts>/<md_rel>doesn’t exist.
- jellycell.render.manuscript.render_manuscripts_index(project: jellycell.paths.Project, *, env: jinja2.Environment, pygments_css: str) str¶
Render the
/manuscripts/landing page listing every manuscript.