Skip to content

blog: add back arrow to blog post pages - #25587

Merged
krrish-berri-2 merged 2 commits into
mainfrom
blog/back-button-and-header-fix
Apr 12, 2026
Merged

blog: add back arrow to blog post pages#25587
krrish-berri-2 merged 2 commits into
mainfrom
blog/back-button-and-header-fix

Conversation

@ishaan-berri

Copy link
Copy Markdown
Contributor

Relevant issues

None

Pre-Submission checklist

  • No tests needed (docs/UI only)

Type

  • Documentation / Blog

Changes

Adds a ← Blog back link that appears fixed in the top-left corner of every blog post page, just below the navbar. Clicking it returns to /blog.

  • Swizzles BlogPostPage to inject BackLink above the post
  • Fixed position (top: calc(var(--ifm-navbar-height) + 1rem); left: 2rem) so it sits flush below the navbar without shifting content
  • Arrow slides left 3px on hover
  • Dark mode aware

@vercel

vercel Bot commented Apr 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Apr 12, 2026 2:13am

Request Review

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR swizzles the Docusaurus BlogPostPage component to inject a fixed "← Blog" back link above every blog post and a "We're hiring" CTA banner below it, along with a CSS module for both. All findings are P2 style/UX suggestions.

Confidence Score: 5/5

Safe to merge — docs/UI only change with only P2 suggestions remaining

All findings are P2: the undocumented HiringCTA is a process note, and the missing mobile breakpoint is a UX polish item. Neither blocks functionality or correctness.

No files require special attention

Important Files Changed

Filename Overview
docs/my-website/src/theme/BlogPostPage/index.js Swizzles BlogPostPage to inject BackLink and HiringCTA; HiringCTA addition is not mentioned in the PR description
docs/my-website/src/theme/BlogPostPage/styles.module.css CSS module for BackLink (fixed-position) and HiringCTA; no mobile breakpoints for the fixed back link

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[BlogPostPage wrapper] --> B[BackLink component\nfixed top-left arrow]
    A --> C[OriginalBlogPostPage\nDocusaurus default]
    A --> D[HiringCTA component\nWe are hiring banner]
    A --> E[useEffect\nadd/remove blog-post-body class]
    B --> F[Navigates to /blog]
    D --> G[Links to ashbyhq jobs page]
Loading

Reviews (2): Last reviewed commit: "blog: style back arrow — fixed top-left ..." | Re-trigger Greptile

Comment on lines +42 to +44
useEffect(() => {
document.body.classList.add('blog-post-body');
return () => document.body.classList.remove('blog-post-body');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 blog-post-body class has no CSS consumer

The class is toggled on document.body but a project-wide search finds no CSS rule anywhere in the repository that targets blog-post-body. This useEffect is dead code — the class is added and removed with no observable effect. Either add the intended CSS rule (e.g. in custom.css) or remove this effect entirely.

function BackLink() {
return (
<div className={styles.backOuter}>
<a href="/blog" className={styles.backLink}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Use Docusaurus Link for internal navigation

A bare <a href="/blog"> triggers a full-page reload. Docusaurus ships @docusaurus/Link, which wraps React Router and gives client-side navigation. Consider swapping it in:

Suggested change
<a href="/blog" className={styles.backLink}>
<Link to="/blog" className={styles.backLink}>

With the corresponding import added at the top:

import Link from '@docusaurus/Link';

@ishaan-berri
ishaan-berri enabled auto-merge (squash) April 12, 2026 02:11
@ishaan-berri
ishaan-berri force-pushed the blog/back-button-and-header-fix branch from 01a0336 to 8657c4f Compare April 12, 2026 02:12
@codspeed-hq

codspeed-hq Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing blog/back-button-and-header-fix (8657c4f) with main (1edf41c)

Open in CodSpeed

@codecov

codecov Bot commented Apr 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@krrish-berri-2
krrish-berri-2 self-requested a review April 12, 2026 02:15
@krrish-berri-2
krrish-berri-2 disabled auto-merge April 12, 2026 02:15
@krrish-berri-2
krrish-berri-2 merged commit fdd7500 into main Apr 12, 2026
41 of 43 checks passed
@krrish-berri-2
krrish-berri-2 deleted the blog/back-button-and-header-fix branch April 12, 2026 02:15
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* blog: add back arrow to post pages

* blog: style back arrow — fixed top-left below navbar
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.

3 participants