Skip to content

Docs(blog): back link above post title#1

Open
Chesars wants to merge 1 commit into
mainfrom
fix/blog-back-link-above-title
Open

Docs(blog): back link above post title#1
Chesars wants to merge 1 commit into
mainfrom
fix/blog-back-link-above-title

Conversation

@Chesars
Copy link
Copy Markdown
Owner

@Chesars Chesars commented May 10, 2026

Was rendered outside the post container — on mobile it overlapped the content, on desktop it floated in the margin. Now it sits inline above the H1, mobile-first.

The "← Blog" link was wrapped around `BlogPostPage`, which sits outside
Docusaurus's `Layout`, so on mobile it rendered visually above the
navbar. Its desktop styling also used `position: fixed`, so the link
floated over the post body whenever the viewport was narrower than the
empty margin beside the 820px content column.

Swizzle `@theme/BlogPostItem/Header` and render a small `<BackLink />`
inside the `<header>`, just before the title. Same left edge as the H1,
scrolls with the content, no overlap. Guard with
`useBlogPost().isBlogPostPage` so the link only shows on individual
posts, not on the blog index.

Drop the now-unused BackLink component and styles from
`src/theme/BlogPostPage/`.
@Chesars Chesars changed the title Move "← Blog" inside the post container Docs(blog): back link above post title May 10, 2026
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