diff --git a/README.md b/README.md index d155d5d..6013a62 100644 --- a/README.md +++ b/README.md @@ -77,16 +77,20 @@ logo: ### flag -> 语言标识 +> Language identifier, multi-language please cooperate with [Subpage](#Subpage-configuration) use. - icon: Language icons, by default only `flag-cn` and `flag-us`, other icons please look for and store in `theme directory/source/images/flags/`. - name: Language name +- default: Whether the language is the default language +- index: The page link Examples: ```yml flag: - icon: flag-cn - name: Chinese + - name: Chinese + default: true + icon: flag-cn + index: /index.html ``` ### search @@ -171,6 +175,16 @@ menu: config: myBlog ``` +### expandAll + +> Whether to expand the sidebar. + +示例: + +```yml +expandAll: true +``` + ### about > About this site in the sidebar. diff --git a/README_CN.md b/README_CN.md index c5d66ff..99cf388 100644 --- a/README_CN.md +++ b/README_CN.md @@ -75,16 +75,20 @@ logo: ### flag -> 语言标识 +> 语言标识,多语言请配合[子页面](#子页面配置)使用 - icon: 语言图标,默认仅有`flag-cn`和`flag-us`, 其他图标自行寻找存放于`主题目录/source/images/flags/` - name: 语言名称 +- default: 该语言是否为默认语言 +- index: 页面链接 示例: ```yml flag: - icon: flag-cn - name: Chinese + - name: Chinese + default: true + icon: flag-cn + index: /index.html ``` ### search @@ -169,6 +173,16 @@ menu: config: myBlog ``` +### expandAll + +> 是否将侧边栏全部展开 + +示例: + +```yml +expandAll: true +``` + ### about > 侧边栏的关于本站 diff --git a/_config.example.yml b/_config.example.yml index 35f4599..5babb20 100644 --- a/_config.example.yml +++ b/_config.example.yml @@ -7,8 +7,10 @@ logo: dark: /images/logo_dark@2x.png flag: - icon: flag-cn - name: Chinese + - name: Chinese + default: true + icon: flag-cn + index: /index.html search: true @@ -24,6 +26,7 @@ userDefinedSearchData: githubCorner: '' +expandAll: false menu: - name: 测试页面 icon: far fa-star diff --git a/layout/common/head.ejs b/layout/common/head.ejs index 994e026..6b4406a 100644 --- a/layout/common/head.ejs +++ b/layout/common/head.ejs @@ -9,7 +9,10 @@ <%- css(Object.values(setting.css)) %> <%- js(setting.js.jquery) %> - + <%- js(setting.js.header) %>