Skip to content

Documentation site ​

VitePress builds the site from docs/. Configuration, theme and separate dependencies live in site/.

sh
cd site
npm ci
npm run dev       # preview at http://localhost:5173/imageflow/
npm run build     # build and check links

Output is written to site/.vitepress/dist/.

Content and navigation ​

SectionSources
Guidedocs/guide/
Templatesdocs/templates/, docs/mcp.md, docs/template-api/
Developmentdocs/development/, docs/releasing.md, docs/signing.md, docs/decisions/
HistoryDesign notes marked with a historical banner

The template API sidebar and topic table use docs/template-api/topics.json. Topic files are shared with the MCP server and template skill. The generated single-page docs/template-api.md is excluded.

Keep the README focused on an introduction, installation, development commands and links into the site. Maintain detailed user instructions in docs/guide/ and developer instructions in docs/development/.

Keep Markdown links relative for GitHub. The site redirects single-page API links to matching topics and links outside docs/ to GitHub.

Add pages to the sidebar in site/.vitepress/config.mts. Its history list controls the historical banner.

Branding ​

The tagline is Designed in code. Composed by eye. Use it consistently in the app's About and start windows, the README, and the documentation site's home page and description.

The navigation uses the light/dark ImageFlow wordmarks from resources/brand/logo/; the home page and favicon use the app mark from the same folder. VitePress serves these canonical SVGs as its public assets, so logo changes require no copy or separate regeneration. The header follows the site's theme switch, and asset URLs respect DOCS_BASE.

Checks and publishing ​

The shared Pages workflow (.github/workflows/pages.yml) builds every pull request and push to main. VitePress rejects missing page links; site/scripts/check-links.mjs checks internal links and anchors in the built page content. Pull requests never deploy.

On pushes to main, published-release changes and manual runs from main, the workflow publishes one combined artifact to GitHub Pages. It copies site/.vitepress/dist/ into .build/pages/, then generates the stable/beta update feeds under .build/pages/updates/. Release-triggered builds check out current main, so refreshing feeds also retains the current documentation. A failed docs build, link check or feed/API request stops deployment and leaves the existing site intact.

Keep the shared workflow as the only Pages deployment workflow: a separate docs-only or feeds-only deployment would replace the other component. Every production deployment includes both documentation and update feeds. Production runs share one concurrency group across all triggers.

Set Settings → Pages → Build and deployment → Source to GitHub Actions. Keep the github-pages environment open to main and v* tags, because release events run in the release tag's context. The production URL and /imageflow/ base path must stay stable: the updater uses https://wirhabenzeit.github.io/imageflow/updates and refuses redirects. DOCS_BASE is available for local previews; adding a production custom domain requires a coordinated app update to its feed URL.

Template screenshots ​

The README and guide use committed artwork in docs/images/. Regenerate it after changing a built-in sample or template:

sh
brew install poppler  # PDF rasterization, once on macOS
npm run screenshots:templates

The command builds and stages the desktop app, then scripts/generate-template-screenshots.mjs opens disposable copies of the current sample/starter and sample/calendar books with an isolated app profile. It runs the real Book check, exports print PDFs, crops each page to its TrimBox, rasterizes them with Poppler, and composes light/dark photobook sheets, a calendar sheet (cover and all twelve months), and a detailed January page. It fails on render errors before replacing the images. The photobook sheets show the saved sample spreads, without appended examples of unused layouts. Sample files and personal books are not modified.

For a review output folder, use npm run screenshots:templates -- --output .build/template-screenshots. Commit the refreshed images with the template changes; the Pages build copies these images rather than regenerating them.

These are separate from preview.jpg inside each template (the authored New Book tile) and the hash-named opening-spread thumbnails generated by scripts/render-template-previews.mjs during Mac packaging. That packaging step does not refresh documentation images.

Automatic refresh PRs ​

The Template screenshots workflow regenerates the four images whenever a non-prerelease GitHub release is published, rendering the current main (releases must be tagged on main). Ordinary commits do not trigger it. To regenerate at any other time, choose Actions → Template screenshots → Run workflow → main. Dispatches from other branches are skipped.

The macOS job renders with read-only repository access, then validates the documentation with the new images. Only after it succeeds does a separate Ubuntu job receive permission to update automation/template-screenshots and open or update one image-only PR. No diff means no new PR; an existing refresh PR that becomes unnecessary is closed. The action is pinned to a release commit. Do not put hand edits on this managed branch.

The publisher checks that the rendered source belongs to current main and its rendering inputs are unchanged. A docs-only main advance is allowed; newer app/sample inputs skip the older artifact, so run the workflow again from main to refresh them. Rendering, PDF checks or docs/link failures never publish images. The bot does not merge its PR: review the artwork, run its checks, then merge to publish through Pages.

One repository setup step is required: Settings → Actions → General → Workflow permissions → Allow GitHub Actions to create and approve pull requests. The workflow grants contents: write and pull-requests: write only to the publishing job; no extra token, signing credentials or automatic approval is configured. GitHub's built-in token creates PR workflow runs that require a maintainer to select Approve workflows to run on the PR before CI starts. See GitHub's token behaviour.