question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve support for trailing slashes

See original GitHub issue

🚀 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
yangshuncommented, Jun 5, 2020

I think we should take a stance here and add trailing / to all Docusaurus-generated URLs. This will bridge the differences during development and deployed. cc @lex111 @slorber

4reactions
davidhaggcommented, Apr 30, 2020

I’ve noticed that the trailing slash potentially destroys internal links as well since the relative root is different. Don’t know if this is a separate bug or a side effect.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should You Have a Trailing Slash at the End of URLs? - Ahrefs
A trailing slash is a forward slash (“/”) placed at the end of a URL such as domain.com/ or domain.com/page/. But should you...
Read more >
To slash or not to slash | Google Search Central Blog
This behavior is beneficial because it reduces duplicate content. In the particular case of redirects to trailing slash URLs, our search results will...
Read more >
Trailing Slash for Google AdWords - Support Center
If you're having issues with your Google Adwords and trailing slashes missing, you may need to employ a plugin to help ensure the...
Read more >
Trailing Slashes in URLs – What is the Preferred Style?
The The URL of a website carries a lot of information to improve user recall and increase the websites SERP standing.
Read more >
What Is a Trailing Slash in URL & How Does It Affect SEO?
It's ok to have trailing slashes after the domain name; Trailing slash matters for most URLs; Trailing slashes on hostnames don't actually ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found