docs: Update website/docs/guides/docs/docs-create-doc.mdx

This clarification helps users understand the implications of using the `id` frontmatter and prevents confusion regarding document paths.
This commit is contained in:
Maria Stellini 2025-07-12 15:34:51 +02:00
parent 0306d18240
commit 45faa4a44b

View file

@ -190,3 +190,6 @@ Lorem ipsum
When using [autogenerated sidebars](./sidebar/autogenerated.mdx), the file structure will determine the sidebar structure. When using [autogenerated sidebars](./sidebar/autogenerated.mdx), the file structure will determine the sidebar structure.
Our recommendation for file system organization is: make your file system mirror the sidebar structure (so you don't need to handwrite your `sidebars.js` file), and use the `slug` front matter to customize URLs of each document. Our recommendation for file system organization is: make your file system mirror the sidebar structure (so you don't need to handwrite your `sidebars.js` file), and use the `slug` front matter to customize URLs of each document.
Add a section explaining that setting the `id` frontmatter will also affect the published path of the document, making it `/{id}` instead of `/{filename}`.