Skip to content

docs: fix relative links to themes and configuration pages - #2856

Open
Goldloli wants to merge 2 commits into
docsifyjs:developfrom
Goldloli:docs/fix-relative-links
Open

Goldloli wants to merge 2 commits into
docsifyjs:developfrom
Goldloli:docs/fix-relative-links

Conversation

@Goldloli

@Goldloli Goldloli commented Nov 2, 2026

Copy link
Copy Markdown

The docs pages for Prism highlighting and plugins link to sibling pages without the .md extension:

  • docs/language-highlight.md: themes and themes#theme-properties
  • docs/emoji.md: configuration#nativeemoji
  • docs/write-a-plugin.md: configuration#catchpluginerrors

Those spellings work on the rendered docsify site (its router resolves extension-less paths), but on GitHub the same links resolve relative to the markdown file and point at non-existent docs/themes / docs/configuration paths, so they 404 when reading the docs in the repository (and in any renderer that treats them as plain relative links).

This adds the .md extension, which GitHub resolves correctly and docsify also handles (the docs already contain links like configuration.md?id=...). The anchor ids (theme-properties, nativeemoji, catchpluginerrors) already exist in the target pages.

Verification: checked the three target pages exist (docs/themes.md, docs/configuration.md) and the anchors are present in them; only documentation links are touched, no code or test changes. npm test was not run because the change is limited to docs/ markdown and does not affect the test suite; happy to run it if you want a green run on the PR anyway.

@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

@Goldloli is attempting to deploy a commit to the Docsify Team on Vercel.

A member of the Team first needs to authorize it.

@sy-records

Copy link
Copy Markdown
Member

Thank you for your feedback.

There are other documents that use this format as well. Could you update them as well?

@Goldloli

Goldloli commented Nov 2, 2026

Copy link
Copy Markdown
Author

Good point — I extended the change to every remaining docs page that links to a sibling page without the .md extension:

  • docs/adding-pages.md (2 links: configuration#loadsidebar, configuration#submaxlevel)
  • docs/configuration.md (4 links: themes, plugins#full-text-search, themes#theme-properties, themes#customization)
  • docs/cover.md (3 links: configuration#coverpage, themes#theme-properties, configuration#onlycover)
  • docs/custom-navbar.md (2 links: configuration#loadnavbar, plugins#emoji)
  • docs/themes.md (2 links: cdn, cdn#specific-version)

Together with the first three files, the branch now fixes 8 files / 18 links. I checked every target resolves to an existing docs/*.md page (and the anchors are present).

One exception: docs/README.md has [Showcase](awesome?id=showcase), but docs/awesome.md does not exist in this repo (the showcase page is not part of docs/), so that link is left untouched rather than pointing at a missing file.

@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docsify-preview Ready Ready Preview Nov 2, 2026 10:35am UTC

This branch was successfully deployed

1 active deployment
Preview — cdd8df7c Deployed Nov 2, 2026 by vercel[bot]
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.

2 participants