Skip to content

docs(site): the footer logo 404s on every page except the homepage #424

Open

Description

@IanoNjuguna

What is wrong

The footer draws the Intersect mark on every page and it 404s everywhere except the homepage.

website/src/theme/Footer/index.tsx:53   {logo && <img src={logo.src} alt="" width={32} height={32} />}
website/docusaurus.config.ts            footer.logo.src: "img/intersect-logo.png"

logo.src comes from config with no leading slash and is rendered verbatim, so the browser resolves it against the current route:

/                                  /img/intersect-logo.png                          200
/docs/getting-started/             /docs/getting-started/img/intersect-logo.png     404
/docs/how-to-guide/beginner/       /docs/how-to-guide/beginner/img/…                404

Why it happens

The stock Docusaurus footer runs its logo through useBaseUrl, which is what turns a config path into a site-absolute one. This component was swizzled to get the Intersect layout (a justified decision, recorded in the file's own header comment) and the swizzle read logo.src directly. Nothing in the build catches it: the path is a string in JSX, so onBrokenLinks never sees it, and the image only fails at request time on nested routes.

Impact

Every docs page, which is most of the site. The homepage is the one page where the relative path happens to resolve.

Fix

useBaseUrl(logo.src) in the component, called before the if (!footer) return null early return so the hook order stays unconditional. That is the same call the stock navbar and footer make, and unlike hardcoding a leading slash it keeps working if the site is ever served under a subpath.

Acceptance

  • the footer <img> carries an absolute path on a nested page as well as on /
  • docusaurus build passes and tsc --noEmit is clean
  • the config value stays relative, since that is the convention the navbar uses too

Activity

  1. self-assigned this
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions