简体   繁体   English

Docusaurus:如何为文档设置自定义 url?

[英]Docusaurus: how to set a custom url for a doc?

I have this structure:我有这个结构:
-Docs -文档
---folder1 ---文件夹1
-----docA1 -----docA1
-----docA2 -----docA2
---folder2 ---文件夹2
-----docB1 -----文档B1
Which means by default the URL of docA2 will be "/docs/folder1/docA2", how can I set it to a custom URL, for example "docs/the-doc-2"?这意味着默认情况下 docA2 的 URL 将为“/docs/folder1/docA2”,我如何将其设置为自定义 URL,例如“docs/the-doc-2”?

Put this in the top of the file:把它放在文件的顶部:

---
slug: what-ever-url-you want
---

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM