Skip to content

docs: stale internal routes lead to missing pages and anchors #767

Description

@dajiaohuang

Describe the bug

Several links in the current Rspress documentation still use routes from the previous documentation layout. They resolve either to 404 pages or to fragments that do not exist on the target page. The bridge package READMEs also link to the old /guide/bridge route.

A build of the current main documentation contains:

  • 21 unique internal links whose target HTML file is absent
  • 4 internal fragment links whose target ID is absent
  • 2 bridge README links to https://www.garfishjs.org/guide/bridge, which returns 404

For example, the API overview links "Garfish 环境变量" to /guide/quickStart/env.html, while the generated page is /guide/quick-start/env.html.

The stale targets fall into a few route migrations:

  • /guide/quickStart/* and /guide/start -> /guide/quick-start/*
  • /guide/{cache,lifecycle,router,sandbox,bridge,build-config} -> /guide/concept/*
  • /guide/demo -> /guide/demo/demo
  • /api.html#loadApp -> /api/loadApp
  • /api/setGlobalObject -> /api/setGlobal
  • /issues.html -> /issues/index

Some bridge and plugin-guide fragments also no longer match the headings generated by Rspress.

Reproduction

  1. Check out cf5dc7de7f771ac7b501ca1fe13b1999fe41a212 (current main).
  2. Install with Node 16.20.2 and pnpm 7.6.0.
  3. Run pnpm --filter rspress-doc-template run build.
  4. Resolve each local href in the 44 generated HTML pages against website-new/doc_build, then verify fragments against generated id attributes.
  5. Open https://www.garfishjs.org/api/index.html and follow the "Garfish 环境变量" link; it opens the 404 page.

Expected behavior

All documentation and package README links should resolve to an existing page and, when present, an existing heading anchor.

Additional context

The documentation build itself succeeds. I can submit a focused documentation-only pull request that updates the stale routes and anchors and re-runs the generated-site link check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions