diff options
author | nodejh <jianghangscu@gmail.com> | 2021-08-16 10:58:30 +0300 |
---|---|---|
committer | nodejh <jianghangscu@gmail.com> | 2021-08-16 10:58:30 +0300 |
commit | 6cf25f8a16b376204cb4b9ca553a10746b157999 (patch) | |
tree | 79c01a7fc78eaa5c26da9e722ba018b87d899c8e | |
parent | 6f14bf4b4e5cfd81e728277d2f64c915079c2b27 (diff) |
feat: feat: ability to hidden summary in home page
-rw-r--r-- | README-zh_CN.md | 9 | ||||
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | exampleSite/config.yaml | 8 | ||||
-rw-r--r-- | layouts/index.html | 2 |
4 files changed, 23 insertions, 5 deletions
diff --git a/README-zh_CN.md b/README-zh_CN.md index f9ea224..824e29f 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -180,6 +180,15 @@ customJS: - 全局支持数学排版:在项目的配置文件中将 `math` 设置为 `true` - 在某页面支持数学拍版:在某页面 Front Matter 中将 `math` 设置为 `true` +### 3.5 在首页隐藏文章摘要 + +如果要在首页隐藏文章摘要,你可以将 `hiddenPostSummaryInHomePage` 设置为 `true`,默认是 `false`。 + +例如: + +```yaml +hiddenPostSummaryInHomePage: true +``` ## License @@ -179,6 +179,15 @@ Mathematical notation is enabled by [KaTeX](https://katex.org/). - To enable KaTex globally set the parameter `math` to `true` in project’s configuration - To enable KaTex on a per page basis include the parameter `math` to `true` in content files +### 3.5 Hidden Post Summary in Home Page + +To hidden post summary in home page, you could set `hiddenPostSummaryInHomePage` to `true`, default is `false`. + +For example: + +```yaml +hiddenPostSummaryInHomePage: true +``` ## License diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 21b0bda..b5caf30 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -53,14 +53,14 @@ params: enableComments: true # To enable comments, you may need to set `googleAnalytics` enableGoogleAnalytics: true - # To enable table of content, you could set `showToc: true` + # To enable table of content, you could set `showToc: true`, default is `false` showToc: true # To hidden powerBy message in the page footer, you could set: `showPowerBy: false`, default is `true` showPowerBy: true - # To enable math typesetting , you could set `math: true` + # To enable math typesetting , you could set `math: true`, default is `false` math: false - # To disable post summary in home page, you could set `disablePostSummaryInHomePage: false`, default is `false` - disablePostSummaryInHomePage: false + # To hidden post summary in home page, you could set `hiddenPostSummaryInHomePage: true`, default is `false` + hiddenPostSummaryInHomePage: false # text in page home: '' # Default: Home diff --git a/layouts/index.html b/layouts/index.html index 2cf1135..2db56a3 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -14,7 +14,7 @@ <div class="date">{{ $date }}</div> </div> - {{ if ne .Site.Params.disablePostSummaryInHomePage true }} + {{ if ne .Site.Params.hiddenPostSummaryInHomePage true }} <div class="summary">{{ $summary | plainify | htmlUnescape }}</div> {{ end }} |