Skip to content

feat!: site-owned pages, redirects, sites under a path; Theme API 4 and 0.3.0 - #40

Merged
geoqiao merged 7 commits into
mainfrom
feat/site-owned-pages
Sep 28, 2026
Merged

geoqiao merged 7 commits into
mainfrom
feat/site-owned-pages

Conversation

@geoqiao

@geoqiao geoqiao commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Summary

The site's config.yaml now decides which pages exist and where; a Theme only supplies templates. escaping also handles old addresses and sites under a path. Version 0.3.0.

  • Pages: pages in config.yaml turns sections on or off, moves them (blog: /posts/), and adds extra pages (/now/, one per project). pages in theme.yaml is rejected with its new place.
  • Theme API 4: only blog.html and post.html are required; other pages fall back to them. Every page has the same page fields (item, items, pagination, newer, older, tag, project). Missing templates name both fixes (add the file, or turn the page off).
  • Redirects: redirects in config.yaml writes pages that send old addresses to current ones. Chains resolve to the final page; circles and duplicates fail; a page always wins (REDIRECT_LEFT_OUT).
  • Sites under a path (https://alice.github.io/notes/): addresses, Issue links and Config values move under it; the url filter for Theme assets; LINK_OUTSIDE_SITE names a missing filter.
  • Found by acceptance (three agents each wrote a Theme against a read-only copy): printing none fails with file and line instead of writing /None links; About has no date; derived descriptions leave out Mermaid source; full URLs into a folder the site does not write (a GitHub project site on the same host) are not checked as pages; theme check renders a second Blog page and leaves out warnings that need real Issues; the Quiet reference is in English with every string key; output from a read-only install can be replaced.

Breaking changes and upgrade steps: CHANGELOG.md → "Upgrading from 0.2". Design record: docs/adr/0009-site-owned-pages-redirects-and-sub-paths.md.

Test plan

  • uv lock --check, ruff check, ruff format --check, ty check
  • pytest -q -ra locally: 681 passed, 96% coverage (includes Playwright browser tests and the wheel consumer test)
  • Acceptance: three Themes written from the docs alone, all passing theme check and build: a two-template Theme with Tags and Projects off (pi, GPT-6 Astra high), a complete independent Theme with /posts/, project pages, /now/ and redirects (Codex, GPT-6 Luna max), a Theme extending Quiet on a site under /notes/, installed on a second site from its README (Claude Code, Sonnet 5 high). The escaping copy they used was unchanged.
  • geoqiao.me ported to 0.3.0 and built with its real Issues: 139 of 170 output files byte-identical to the 0.2.0 build; the other 31 are the redirect pages, formerly written by a site script, now by escaping, each landing on a real post.
  • CI on this PR

🤖 Generated with Claude Code

geoqiao and others added 7 commits September 28, 2026 16:52
…blog.html and post.html

- pages: in config.yaml moves or turns off Ideas, Tags, Projects and About,
  changes the Blog prefix, and lists extra pages (pages.extra). theme.yaml
  no longer declares pages.
- Theme API 4: only blog.html and post.html are required. Home, Ideas and tag
  pages fall back to blog.html; Ideas and About to post.html. tags.html and
  projects.html are needed only while those pages are on, and the error names
  both fixes.
- Every list page gets page.items and page.pagination; every single page gets
  page.item (with page.newer/page.older for posts and Ideas).
- The default navigation follows the pages that are on. Issues of a section
  that is off are left out with a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
escaping writes a small page at each old address (meta refresh, canonical,
noindex). A redirect to another old address follows it to the page. A page
always wins over a redirect; one that cannot be written is left out with a
warning, since the pages it depends on come from Issues. The artifact check
accepts these pages and checks their links like any other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tes/

site.url and the Pages URL may carry a path. Page addresses, links in Issue
bodies and site-relative addresses in config.yaml move under it; output files
do not. Themes write their own files as {{ '/assets/site.css'|url }}, and the
output check names that filter when an address leaves the site's path.
robots.txt is left out, because crawlers read it only at a host's root.
The platform context loses pages_base_path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Theme guide covers template fallback, the uniform page data, the url
filter, extra pages set in config.yaml, sharing a Theme and migrating from
API 3. Site inputs gain Pages, Redirects and Sites under a path. ADR-0009
records the decision and supersedes ADR-0003 and ADR-0005.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared scripts were copied with copytree, which keeps file and directory
modes. From a read-only install the output was read-only too, and the next
build could not remove it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Theme authors following the English guide landed on a Chinese Quiet page
that named one string key and pointed at theme.yaml for the rest. A test
keeps the key list in step with Quiet's theme.yaml. Redirect pages get a
viewport so the fallback link reads on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A template that prints none fails with its file and line; the example
  independent Theme wrote /None links with the tag pages off.
- About from an Issue has no created_date: About shows no date.
- Derived descriptions leave out Mermaid source, which readers never see.
- A full URL into a folder the site does not write may be another site on
  the host, such as a GitHub project site, and is not checked as a page. A
  broken page link suggests a redirect.
- theme check renders a second Blog page and leaves out warnings about the
  Issues a Config names, which sample content cannot match.
- Docs: moving a section keeps Issue links, redirect chains land on the
  final page, sharing checks cover the pages a Theme supports, updating
  replaces the folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@geoqiao
geoqiao merged commit c7a1643 into main Sep 28, 2026
1 check passed
@geoqiao
geoqiao deleted the feat/site-owned-pages branch September 28, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant