From bedc262d8364a6e62d3580ae41875befa0fca24d Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Wed, 31 Jan 2018 13:13:16 +0800 Subject: [PATCH] docs: update alias fixed #372 --- docs/de-de/more-pages.md | 13 +++++++++++++ docs/deploy.md | 4 ++-- docs/more-pages.md | 14 +++++++++++++- docs/zh-cn/more-pages.md | 13 +++++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/docs/de-de/more-pages.md b/docs/de-de/more-pages.md index 1d32fc7a..a82d2b5e 100644 --- a/docs/de-de/more-pages.md +++ b/docs/de-de/more-pages.md @@ -53,6 +53,19 @@ Als Zweites erstellst du eine Datei namens `_sidebar.md`: `_sidebar.md` wird in jedem Verzeichnislevel geladen. Sollte das aktuelle Verzeichnis keine Datei namens `_sidebar.md` haben, so sucht **docsify** in den übergeordneten Ordnern. Wenn du z.B. im Moment im Verzeichnis `/guide/quick-start` bist, so wird `_sidebar.md` von der Datei `/guide/_sidebar.md` geladen. +You can specify `alias` to avoid unnecessary fallback. + +```html + +``` + ## Inhaltsverzeichnis Eine angepasste Seitenleist kann auch automatisch ein Inhaltsverzeichnis generieren, indem ein `subMaxLevel` gesetzt wird, vergleiche [sub-max-level Einstellungen](configuration.md#sub-max-level). diff --git a/docs/deploy.md b/docs/deploy.md index 91fc3160..4db657a3 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -14,8 +14,8 @@ It is recommended that you save your files to the `./docs` subfolder of the `mas ![github pages](_images/deploy-github-pages.png) -!> You can also save files in the root directory and select `master branch`. -!> You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch +!> You can also save files in the root directory and select `master branch`. +You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch ## GitLab Pages diff --git a/docs/more-pages.md b/docs/more-pages.md index fc739ff5..ff77bb90 100644 --- a/docs/more-pages.md +++ b/docs/more-pages.md @@ -53,10 +53,22 @@ You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignori `_sidebar.md` is loaded from each level directory. If the current directory doesn't have `_sidebar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_sidebar.md` will be loaded from `/guide/_sidebar.md`. +You can specify `alias` to avoid unnecessary fallback. + +```html + +``` ## Table of Contents -Once you've created `_sidebar.md`, the sidebar content is automatically generated based on the headers in the markdown files. +Once you've created `_sidebar.md`, the sidebar content is automatically generated based on the headers in the markdown files. A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [sub-max-level configuration](configuration.md#sub-max-level). diff --git a/docs/zh-cn/more-pages.md b/docs/zh-cn/more-pages.md index 8a517f4f..b359474f 100644 --- a/docs/zh-cn/more-pages.md +++ b/docs/zh-cn/more-pages.md @@ -49,6 +49,19 @@ docs/zh-cn/guide.md => http://domain.com/zh-cn/guide `_sidebar.md` 的加载逻辑是从每层目录下获取文件,如果当前目录不存在该文件则回退到上一级目录。例如当前路径为 `/zh-cn/more-pages` 则从 `/zh-cn/_sidebar.md` 获取文件,如果不存在则从 `/_sidebar.md` 获取。 +当然你也可以配置 `alias` 避免不必要的回退过程。 + +```html + +``` + ## 显示目录 自定义侧边栏同时也可以开启目录功能。设置 `subMaxLevel` 配置项,具体介绍见 [配置项#sub-max-level](zh-cn/configuration#sub-max-level)。