Skip to content

Improve support for trailing slashes #2654

@kripod

Description

@kripod

🚀 Feature

Add a preferTrailingSlashes option (or something similar) to docusaurus.config.js.

Have you read the Contributing Guidelines on issues?

Yes.

Motivation

If hosting documentation on GitHub Pages, a trailing slash appears in the URL when navigating to a specific Docusaurus page from outside the docs.

For instance, https://glaze.js.org/docs/introduction sends the visitor to https://glaze.js.org/docs/introduction/.

In order to keep consistency, there should be an option for sidebar links to have a trailing comma by default, without resorting to a longer sidebar item format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain: trailing slashRelated to trailing slash configfeatureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions