-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
docs: clarify impact of document ID on the URL #11339
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
docs: clarify impact of document ID on the URL #11339
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Josh-Cena
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why this needs such a long wall of text. I think it would just be a few sentences saying how the ID is used as the default for the slug, so if you change the ID you may want to restore to the previous URL by setting the slug.
slorber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, agree we should clarify this and recommend the usage of slug
But also agree with @Josh-Cena , this is currently too verbose. Please try to explain things as clearly and concisely as possible. I don't think we need new headings to cover that topic, and you should focus on providing that information in 2/3 sentences max.
| ### Doc URLs {#doc-urls} | ||
|
|
||
| By default, a document's URL location is its file path relative to the `docs` folder, with a few exceptions. Namely, if a file is named one the following, the file name won't be included in the URL: | ||
| By default, a document's URL location is its file path relative to the `docs` folder, with a few exceptions. Namely, if a file is named one of the following, the file name won't be included in the URL: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should start by saying that the filename is used as the default ID and the ID is used as the default slug, except for these "category index" files (IIRC, I have long forgotten about the technical details). Otherwise the tip that changing the id changes the URL doesn't make sense
Pre-flight checklist
Motivation
Closes #10496
Deploy preview: https://deploy-preview-11339--docusaurus-2.netlify.app/docs/create-doc/