Repository navigation
docs: style the landing-page table of contents - #110
Merged
Merged
Conversation
Reader feedback on the landing page: the TOC is useful but renders as
booklit's default — a plain nested bulleted list with section numbers
inside the link text. Override toc.tmpl to render it as an actual
contents block: a small-caps "Contents" label, one row per chapter with
the number in its own muted monospace column outside the link, and the
chapter's sections as a compact dot-separated run underneath. Depth is
capped at two levels; the old TOC recursed into third-level headings
("Double-quoted", "Named", ...), which is more detail than a
skim-friendly landing page needs. The feedback widget already skips
<nav> elements, so the new markup stays out of its reach like the old
one did.
Signed-off-by: Alex Suraci <[email protected]>
Deploying dang with
|
| Latest commit: |
8c8d07a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://674b3426.dang-3kk.pages.dev |
| Branch Preview URL: | https://docs-toc-styling.dang-3kk.pages.dev |
The note said "don't try to build a full TOC here", which now contradicts the page: the curated two-level contents block is intentional. Describe the actual shape — chapters plus their sections, depth capped by toc.tmpl — and keep the pointer that deeper navigation belongs to the sidebar and the pages themselves. Signed-off-by: Alex Suraci <[email protected]>
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.
Addresses docs feedback on the landing page: the TOC was booklit's default rendering — a plain nested bulleted list with section numbers inside the link text — and the reader asked for it to be styled tastefully as an actual table of contents.
This overrides
toc.tmpl(project templates indocs/html/shadow booklit's defaults) and styles it inpage.tmpl:Contentsblock with the same small-caps label treatment as the sidebar headings.The feedback widget skips everything inside
<nav>, so the new markup is ignored by it just like the old TOC was. Only the landing page uses\table-of-contents, so nothing else is affected.Note: the
> Meta:blockquote above the TOC still says "don't try to build a full TOC here" — left untouched per convention, but it may be worth updating to reflect that a curated two-level TOC is intentional now.🤖 Generated with Claude Code