From 123c516836b06dc0c6cea9a4fd46a2105b757b6e Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Thu, 1 Mar 2018 22:40:55 +0800 Subject: [PATCH] docs: add fallbackLanguages --- docs/de-de/configuration.md | 18 ++++++++++++++++++ docs/zh-cn/configuration.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/docs/de-de/configuration.md b/docs/de-de/configuration.md index 076c015d..87e4869c 100644 --- a/docs/de-de/configuration.md +++ b/docs/de-de/configuration.md @@ -401,3 +401,21 @@ window.$docsify = { ext: '.md' }; ``` + +## fallbackLanguages + +* type: `Array` + +List of languages that will fallback to the default language when a page is request and didn't exists for the given local. + +Example: + +* try to fetch the page of `/de/overview`. If this page exists, it'll be displayed +* then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed +* then display 404 page. + +```js +window.$docsify = { + fallbackLanguages: ['fr', 'de'] +}; +``` diff --git a/docs/zh-cn/configuration.md b/docs/zh-cn/configuration.md index ef80b9f7..f91355f2 100644 --- a/docs/zh-cn/configuration.md +++ b/docs/zh-cn/configuration.md @@ -413,3 +413,21 @@ window.$docsify = { ext: '.md' }; ``` + +## fallbackLanguages + +* type: `Array` + +List of languages that will fallback to the default language when a page is request and didn't exists for the given local. + +Example: + +* try to fetch the page of `/de/overview`. If this page exists, it'll be displayed +* then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed +* then display 404 page. + +```js +window.$docsify = { + fallbackLanguages: ['fr', 'de'] +}; +```