Skip to content

Conversation

@shanti2530
Copy link
Contributor

@shanti2530 shanti2530 commented Jul 19, 2025

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Closes #10496

Deploy preview: https://deploy-preview-11339--docusaurus-2.netlify.app/docs/create-doc/

@meta-cla meta-cla bot added the CLA Signed Signed Facebook CLA label Jul 19, 2025
@netlify
Copy link

netlify bot commented Jul 19, 2025

[V2]

Name Link
🔨 Latest commit 99bf4f2
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/688b587ead560b0008e69e06
😎 Deploy Preview https://deploy-preview-11339--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Jul 19, 2025

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🔴 43 🟢 98 🟢 100 🟢 100 Report
/docs/installation 🟠 57 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 69 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 60 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 57 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 60 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 66 🟢 100 🟢 100 🟠 86 Report

@Josh-Cena Josh-Cena added the pr: documentation This PR works on the website or other text documents in the repo. label Jul 19, 2025
@Josh-Cena Josh-Cena changed the title docs: Clarified impact of document ID on the URL docs: clarify impact of document ID on the URL Jul 19, 2025
Copy link
Collaborator

@Josh-Cena Josh-Cena left a 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.

Copy link
Collaborator

@slorber slorber left a 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:
Copy link
Collaborator

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

@slorber slorber merged commit b139134 into facebook:main Jul 31, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting id frontmatter unexpectedly affects the published path of a document

3 participants