Skip to content

refactor: write README and blended homepages through one page writer - #520

Merged
has2k1 merged 2 commits into
mainfrom
refactor/homepage-writer
Nov 3, 2026
Merged

has2k1 merged 2 commits into
mainfrom
refactor/homepage-writer

Conversation

@has2k1

@has2k1 has2k1 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

The README homepage and the homepage promoted from the first user guide page (homepage: user_guide) are now written by one page writer, instead of two builder methods that each assembled the front matter, hero and sidebar. The written pages are unchanged: the README homepage keeps its sidebar in Quarto's margin column, and the user guide homepage keeps it after the body, where a margin column would shift the guide's grid and mobile readers see the content first.

A README homepage with hero.name: true no longer stops the build with an AttributeError; it now builds and keeps the README's title.

The README homepage and the homepage promoted from the first user guide
page now share one writer for `index.qmd`: front matter, the hero as a
raw HTML block, the body and the metadata sidebar. The README pipeline
(source selection, landing page, hero, duplicate title, search
description, heading levels) and the blended pipeline (table of
contents off, first heading removed) move with it. The build still
gathers the package metadata, the package name and the page map, and
passes them in.

Both sidebar layouts are kept on purpose. The README homepage puts the
sidebar in Quarto's margin column before the body, with a style rule
that tightens the first heading's top margin. A user guide page puts it
after the body, because a margin column changes Quarto's grid there and
mobile readers should see the content first. The written pages are
unchanged.

The page map is now computed once per homepage. In the user guide
fallback with an empty user guide directory, its warning about that
directory is printed once instead of zero to two times.
With the hero enabled and `hero.name: true`, the build stopped with an
`AttributeError` while checking whether the README's first heading
repeats the hero name. It now skips that check, so the build finishes
and the README keeps its title.
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

📚 Preview this PR's docs locally

Fetch the just-built site and open it in your browser:

# this exact build
great-docs preview --run 41630009344

# or always the latest build for this PR
great-docs preview --pr 520
Auth & tips
  • Requires great-docs: pip install great-docs (or run via pipx/uvx).
  • Auth: run gh auth login then add --use-gh, or set GITHUB_TOKEN (needs Actions: read).
  • Jump to a page: add --path reference/index.html.
  • Latest vs exact: --pr <n> grabs the newest build; --run <id> pins this one.
  • Re-download: --refresh ignores the local cache.

@has2k1
has2k1 merged commit 1360ea7 into main Nov 3, 2026
9 checks passed
@has2k1
has2k1 deleted the refactor/homepage-writer branch November 3, 2026 11:56
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