Skip to content

fix(theme): stop section pages stranding prose beside full-width blocks - #190

Merged
sanity merged 3 commits into
mainfrom
fix/nix-page-layout
Sep 28, 2026
Merged

sanity merged 3 commits into
mainfrom
fix/nix-page-layout

Conversation

@sanity

@sanity sanity commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On https://freenet.org/nix/ (and /quickstart/, /try/, /uninstall/, /build/) the body text looks as if every line were hand-broken. Section pages (_index.md) render in list.html's wide is-section-page shell (1344px). The reading-measure rule caps paragraphs at 66ch there, while code blocks, tables, tabs and alerts run the full width, so the prose sits in a narrow strip beside them. base.css itself calls this shape one that "reads as a broken layout".

Fix

  1. /nix/ is an article, so it is now a leaf page. nix/_index.md becomes nix/index.md, with the same /nix/ URL and the same pattern as /bug/.
  2. A section with no child pages renders as an article (list.html). The wide shell exists for the child-page card grid; without one it only strands the text. This affects /try/, /uninstall/, /donate/thanks/ and /ghostkey/success/.
  3. A section with a card grid caps its intro as a whole (base.css), so code blocks, tabs and alerts share the text measure while the grid below keeps the full width. This affects /quickstart/, /build/, /about/, the manual sections and /resources/.
  4. Fenced code blocks now break out of the prose column as intended. The existing breakout rule matched .content > pre, but Hugo wraps every highlighted fence in div.highlight, so it never applied to one. Long commands (e.g. on /uninstall/) were clipped and scrolled instead.

Testing

Built with Hugo and screenshotted at 1400px /nix/, /quickstart/, /try/, /uninstall/, /build/, /donate/thanks/ and /about/ (the unchanged-grid control), plus /nix/ at 420px. Every page reads as one column. Code blocks break out symmetrically on desktop and scroll inside the column on mobile. Card grids are unchanged. The quickstart link to /nix/ still resolves.

Review note: as a leaf page, /nix/ no longer emits a section RSS feed at /nix/index.xml. Nothing links to it.

[AI-assisted - Claude]

https://claude.ai/code/session_016xwEnj4eizFJUpd1bPwPQa

As _index.md the page used the section-landing layout: a 1344px shell
where paragraphs are capped at 66ch but code blocks, the alert and the
table run full width, so the prose looked hard-wrapped against a wide
empty margin. As a leaf page (index.md, same /nix/ URL, like /bug/) it
gets the is-prose column that headings, text and code share.

Claude-Session: https://claude.ai/code/session_016xwEnj4eizFJUpd1bPwPQa
Section pages used a 1344px shell where paragraphs are capped at 66ch
but code blocks, tables, tabs and alerts run the full width, so the text
looked hard-wrapped. A section with no child pages (try, uninstall,
donate/thanks, ghostkey/success) now renders in the is-prose article
column; one with a card grid (quickstart, build, about, ...) caps the
intro as a whole, so its blocks share the text measure while the grid
below stays wide.

Also make fenced code blocks break out of the prose column as the CSS
already intended: Hugo wraps them in div.highlight, so the '> pre'
selector never matched one.

Claude-Session: https://claude.ai/code/session_016xwEnj4eizFJUpd1bPwPQa
@sanity sanity changed the title fix(nix): render /nix/ as an article page, not a section landing page fix(theme): stop section pages stranding prose beside full-width blocks Sep 28, 2026
It rendered an empty div whose top margin left a gap at the foot of what
is now an article-width page (review finding on #190).

Claude-Session: https://claude.ai/code/session_016xwEnj4eizFJUpd1bPwPQa
@sanity
sanity merged commit 436c663 into main Sep 28, 2026
3 checks passed
@sanity
sanity deleted the fix/nix-page-layout branch September 28, 2026 16:06
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