From 8cd169db2d0d4306434894e7eeaa41ef906515f2 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Thu, 4 Jun 2020 16:10:11 +0800 Subject: Allow disable toc globally --- README.md | 6 ++++-- README_CN.md | 8 +++++--- layouts/partials/sidebar.html | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8d0283c..573140b 100644 --- a/README.md +++ b/README.md @@ -71,19 +71,21 @@ Create `[SITEROOT]/layouts/partials/favicon.html` to cover theme's favicon. You can generate your favicons in [realfavicongenerator.net](https://realfavicongenerator.net/). -### ❌ In-post license & comments +### ❌ In-post license, comments und toc You can set variables below in post's front matter to disable them: ```toml noLicense = true # Do not show license in this post noComments = true # Do not show comments in this post +noToc = true # Do not show toc in this post ``` -Or you can disable the license globally, set this below to false or comment it in your `config.toml`: +Or you can disable these globally, set these below to false or comment it in your `config.toml`: ```toml showLicense = false +showToc = false ``` ### 🎵 APlayer diff --git a/README_CN.md b/README_CN.md index 2da3478..7ea9dab 100644 --- a/README_CN.md +++ b/README_CN.md @@ -61,19 +61,21 @@ $ git submodule update --remote --merge 可以在 [realfavicongenerator.net](https://realfavicongenerator.net/) 快速创建自己的图标。 -### ❌ 关闭 License 和评论 +### ❌ 关闭 License、评论区和目录 -安全第一,在 front matter 里加上这些: +在 front matter 里加上这些: ```toml noLicense = true # 憋显示 License noComments = true # 憋显示评论区 +noToc = true # 憋显示目录 ``` -你也可以全局关闭 License 显示,在 `config.toml` 把下面这项设置为 false 或注释掉: +你也可以全局关闭这些内容的显示,在 `config.toml` 把下面这些设置为 false 或注释掉: ```toml showLicense = false +showToc = false ``` ### 🎵 文章音乐 diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 8e902c1..7ead0e2 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,6 +1,6 @@