-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nav: fix problem with non-existing pages in sidebar #1060
Comments
OK so these are fixed by "temporary" redirects right? 307 status code for example. (Keeping in mind our docs structure keeps changing so for example the top item in /changelog may go from /0.1 to /0.2, etc.)
Yes this would be terrible, but why do we only want 301s there? I'm not sure about that part. Each redirect type serves different purposes, see discussion in #757 (comment)
I vote for this. And it could use sidebar.json as base instead of browsing the directories. |
It's done now. |
Amazing 🎉 |
In the old
sidebar.json
config it was possible to create page withsource: false
and then user requested such a page, it's first child was rendered instead.For example then you enter in browser
/doc/changelog/
it will show content of/doc/changelog/0.18
. As a result we have two pages with the exactly same content on different url. It is bad for SEO and it is bad for search with docsearch because we can have duplicate results (enterchangelog
in the search for example).Right now we made a temporal solution:
source: false
we added temporary 307 redirects to theredirects-list.json
file.But it is a bad long-term solution and also requires us to manually check
redirects-list.json
file every time we want to add page to see if there is a redirect that prevents it. We want to only have permanent 301 redirect in this file.There is multiple ways how can we fix this problem:
index.md
files (they should throw errors on build).imdex.md
files in doc folder. (Possible conflicts between 2 middlewares for redirects)<link rel="canonical" />
.But as result we want to remove temporary redirects from
redirects-list.json
and make this logic the part of the app.The text was updated successfully, but these errors were encountered: