Repository navigation
refactor: write README and blended homepages through one page writer - #520
Merged
Merged
Conversation
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.
📚 Preview this PR's docs locallyFetch 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 520Auth & tips
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: trueno longer stops the build with anAttributeError; it now builds and keeps the README's title.