Skip to content

post page redesign: header, toc, footer#24

Merged
benthecoder merged 1 commit into
mainfrom
post-design
Jul 12, 2026
Merged

post page redesign: header, toc, footer#24
benthecoder merged 1 commit into
mainfrom
post-design

Conversation

@benthecoder

Copy link
Copy Markdown
Owner

redesigns how posts render. the header is now left-aligned with a proper h1 and one quiet meta line (date · read time); the card wrapper is gone so prose sits directly on the page in a 65ch column; tags, views, similar, and prev/next are merged into a single bordered footer instead of three stacked blocks. adds a table of contents — sticky rail with scrollspy on wide screens, collapsed native details block on mobile — with heading anchors from rehype-slug, plus a hero treatment so posts opening with an image render it above the contents block.

the image alignment bug was a good lesson in css specificity: a global .prose img rule with width auto and a 65vh height cap was silently beating the w-full utility on PostImage (class + :not() + element outranks a single class), which is why images floated centered at intrinsic size. the fix was also a reminder that height caps and full-width columns are fundamentally incompatible without distortion — the industry norm (medium, substack, github) is width 100%, height auto, and just let tall images be tall.

til: rehype-slug and github-slugger share the same slugger, so you can extract a toc from raw markdown server-side and the ids line up with the rendered heading anchors for free — no client-side dom walking needed.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Building Building Preview, Comment Jul 12, 2026 5:11pm

@benthecoder
benthecoder merged commit 2c70879 into main Jul 12, 2026
2 of 3 checks passed
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