From e6ad3c778bd8bb76abcc984c941c74594bfc3c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Camdaous?= Date: Thu, 23 Jun 2022 19:23:56 +0800 Subject: [PATCH 1/3] docs: mkdocs.zh.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “amdaous --- docs/development/mkdocs.zh.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/development/mkdocs.zh.md b/docs/development/mkdocs.zh.md index 767860309..bb2bec1b5 100644 --- a/docs/development/mkdocs.zh.md +++ b/docs/development/mkdocs.zh.md @@ -46,6 +46,28 @@ - 编写文档的内容。您可以选择只写英文文档或中文文档;您不必用两种语言编写文档;当然如果您希望展示您中英双语的实力的话,我们建议您两种语言的文档同时编写,一并提交。 - 更新`/mkdocs.yml`文件,更新`nav:`部分。这是整个文档网站的目录。 +## 设置导航 + +如果要自定义导航菜单,可以更新`mkdocs.yaml`中的`nav:`部分,支持通配符和子目录链接。例如: + +``` +nav: + - DTM Commands Explained in Depth: + - commands/autocomplete*.md + - commands/*.md + - Plugins: + - plugins/plugins-list*.md + - plugins/*.md + - Best Practices: best-practices/ + - 'contributing_guide*.md' + - 'contributor_ladder*.md' +``` + +- 通常,`contributing_guide*.md`应该是`contributing_guide.md`和`contributing_guide.zh.md`两个文件; +- 如果在`commands/`, `plugins/`, `best-practices/`目录中创建文档,不需要更新`nav`。 + +如果想了解更多关于导航的配置,请参阅配置[页面导航](https://www.mkdocs.org/user-guide/writing-your-docs/#configure-pages-and-navigation)和[导航语法](https://oprypin.github.io/mkdocs-literate-nav/)。 + ## 在本地查看您的更改 运行: From c4852688c5e5e8c10ab25aefa33fb979c86740ab Mon Sep 17 00:00:00 2001 From: Bird Date: Fri, 24 Jun 2022 10:32:19 +0800 Subject: [PATCH 2/3] docs: fix minor semantic errors Signed-off-by: Bird --- docs/development/mkdocs.zh.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/development/mkdocs.zh.md b/docs/development/mkdocs.zh.md index bb2bec1b5..cc783e9bf 100644 --- a/docs/development/mkdocs.zh.md +++ b/docs/development/mkdocs.zh.md @@ -63,10 +63,10 @@ nav: - 'contributor_ladder*.md' ``` -- 通常,`contributing_guide*.md`应该是`contributing_guide.md`和`contributing_guide.zh.md`两个文件; +- 通常,`contributing_guide*.md`指代了`contributing_guide.md`和`contributing_guide.zh.md`两个文件,分别是英文和中文文档; - 如果在`commands/`, `plugins/`, `best-practices/`目录中创建文档,不需要更新`nav`。 -如果想了解更多关于导航的配置,请参阅配置[页面导航](https://www.mkdocs.org/user-guide/writing-your-docs/#configure-pages-and-navigation)和[导航语法](https://oprypin.github.io/mkdocs-literate-nav/)。 +如果想了解更多关于导航的配置,请参阅[配置页面与导航](https://www.mkdocs.org/user-guide/writing-your-docs/#configure-pages-and-navigation)和[导航语法](https://oprypin.github.io/mkdocs-literate-nav/)。 ## 在本地查看您的更改 From a35fc68cb38e9d77d2009442f79685280919fd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Camdaous?= Date: Fri, 24 Jun 2022 16:57:37 +0800 Subject: [PATCH 3/3] docs: update mkdocs.zh.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “amdaous --- docs/development/mkdocs.zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/mkdocs.zh.md b/docs/development/mkdocs.zh.md index cc783e9bf..74439c134 100644 --- a/docs/development/mkdocs.zh.md +++ b/docs/development/mkdocs.zh.md @@ -44,7 +44,7 @@ - 在`/docs`文件夹中创建`doc_name.md`和`doc_name.zh.md`。如有必要,您可以将它们放在恰当的子文件夹下。参考当前目录结构来确定适合该文档的最佳路径。 - 编写文档的内容。您可以选择只写英文文档或中文文档;您不必用两种语言编写文档;当然如果您希望展示您中英双语的实力的话,我们建议您两种语言的文档同时编写,一并提交。 -- 更新`/mkdocs.yml`文件,更新`nav:`部分。这是整个文档网站的目录。 +- 大多数情况下,您不需要考虑导航菜单,它是整个文档网站的目录。但是如果需要自定义导航菜单,可以参考[设置导航](https://github.com/devstream-io/devstream/blob/main/docs/development/mkdocs.md#setting-up-navigation)。 ## 设置导航