Files
the-daily-epub/src/epub/templates
thalladaandClaude Fable 5.1 bedbcb218f Show what the pipeline understood about each article
A muted one-line note now follows every article: the deep assessment's
topic group, format, depth and technicality, the specific topics it
extracted, and the reader interests the article matched best, e.g.

  Software engineering · analysis essay · in depth · highly technical ·
  Topics: copy-on-write, ZFS · Interests: Filesystems, Rust

It renders on the web article page footer, on the public and private
issue-page entries, in the EPUB article footer and in the EPUB "In This
Issue" index (both editions), always styled like the existing meta lines
so it stays secondary to the content.

`Pick` gains `top_interests` (serde default, no migration), filled from
the signals stage when the editor assembles the lineup; the facets were
already on the issue snapshot via `Pick.llm`, so earlier issues show the
facet and topic parts and only future issues carry interests. One shared
builder, `understanding_line` in epub::chapters, feeds every surface.

The dev seed gives four picks facets and interests so the line can be
eyeballed locally.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QVPagF6jfDv78CC5Jv2wp4
2026-09-08 19:44:00 +00:00
..

EPUB templates

Askama templates and stylesheets for the two editions (spec §3.10, implementation notes §11). src/epub/build.rs owns the structs they bind to; askama.toml at the crate root points askama here (dirs = ["src/epub/templates"]).

File Template struct Purpose
base.xhtml — Shared XHTML skeleton ({% block body_class %}, {% block content %})
cover_page.xhtml CoverPage Page that displays the rasterized cover image
front_page.xhtml FrontPage "The Brief" + issue stats line
in_this_issue.xhtml InThisIssue Introduction chapter: per-section linked index
section.xhtml SectionPage Section title page (name only)
chapter.xhtml ArticleChapter Article: header, body, rating/read-online footer
discussion.xhtml DiscussionChapter Comment chapter (§3.7); body from comments::render_xhtml
world_briefing.xhtml WorldBriefingChapter Wikipedia Current Events (§3.8), body from world::render_xhtml
behind.xhtml BehindChapter "Behind the paper": run counts, admission mix, near misses, models (§15.1)
colophon.xhtml ColophonChapter Back matter: models, cost, counts
cover.svg CoverSvg Typographic cover, rasterized with resvg + tiny-skia
style.css — Standard-edition stylesheet, embedded as stylesheet.css
style-x4.css — X4 stylesheet: no floats/flex/grid, no fonts, hyphenation on

Conventions:

  • Every content template {% extends "base.xhtml" %} and provides title.
  • Templates declare escape = "html" — .xhtml/.svg are not in askama's default escaper extension list. Escaping emits numeric character references (&#38;), which are valid XML; only pre-sanitized markup uses |safe.
  • Markup that reaches |safe has gone through ammonia and epub::images::to_xhtml (void elements self-closed, &nbsp; → &#160;) so the output parses as XML, as EPUB3 content documents must.
  • Entities other than the five XML built-ins are written as numeric references in the templates themselves (&#183;, &#128077;, …).