Skip to content

unexpected trailing slash #73

Closed
Closed

Description

@Sudrut

When I access the doc pages in cppdoc.cc there are always trailing slashes after the URL, even though in astro config file the trailingSlash option is set to "never". I don't know if it is a bug or is because I didn't configure my browser appropriately.

The trailing slashes makes the link at the end of migration guidelines points to an page doesn't exist.

Image

By the way, should we add an id attr to DocLink, to support jumping into a specific position of a doc page?

Activity

  1. Sudrut commented on Dec 14, 2025

    @Sudrut
    ContributorAuthor

    For "jumping into a specific position" see #76 , it just modified href attribute of <a> tag and didn't change DocLink's underlying logic.

  2. Lancern commented on Dec 16, 2025

    @Lancern
    Collaborator

    Astro documentation says:

    Trailing slashes on prerendered pages are handled by the hosting platform, and may not respect your chosen configuration. See your hosting platform’s documentation for more information. You cannot use Astro redirects for this use case at this point.

    Since all cppdoc pages are pre-rendered, I guess GitHub pages is the one to blame. Maybe we could consider "normalizing" the links in the DocLink component by adding a trailing slash if missing.

  3. Sudrut commented on Dec 17, 2025

    @Sudrut
    ContributorAuthor

    Solved in #79 #80 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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