feat: Typst lesson template with Jellyfin media frontmatter #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-3-typst-template"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements the Typst lesson template and example lesson for #3.
Files added
templates/lesson.typ— Reusable template withlesson-template()functionraw(lang: "jellyfin-media", "uuid|Title")which produces<code data-lang="jellyfin-media">elements in HTMLmedia-ref()helper for inline media references in lesson bodytemplates/example-lesson.typ— Complete example lesson (The Water Cycle)Acceptance
typst compile --features html templates/example-lesson.typproduces valid HTML<h2>), metadata (Grade 3 — Science — 2026-01-15), and all content sections<code data-lang="jellyfin-media">uuid-water-cycle|The Water Cycle Explained</code>Media Reference Format
The plugin can parse
<code data-lang="jellyfin-media">uuid|Title</code>elements from the HTML to:Closes #3
Reviewed — looks good overall. Two things:
Media reference format: Using
raw(lang: "jellyfin-media", ...)is clever — produces<code data-lang="jellyfin-media">in HTML which the plugin can reliably parse. 👍One fix needed: The
list.item(media-ref(...))inmedia-section()will render as a list item containing a<code>block. In HTML output, Typst wrapsrawblocks in<pre><code>which will break inline list rendering. Changeraw(lang: "jellyfin-media", id + "|" + title)to emit something inline-friendly. Two options:block: falsein the raw call if Typst supports it#show raw where lang: "jellyfin-media": ...that wraps them in a<span>insteadBest approach: wrap it as
[#raw(lang: "jellyfin-media", id + "|" + title, block: false)]to keep it inline within the list item.Fix that and this is ship-ready.
Fix applied —
raw(lang: "jellyfin-media", ..., block: false)keeps it inline in lists. Re-approving.