Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejh/hugo-theme-cactus-plus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornodejh <jianghangscu@gmail.com>2021-08-16 10:58:30 +0300
committernodejh <jianghangscu@gmail.com>2021-08-16 10:58:30 +0300
commit6cf25f8a16b376204cb4b9ca553a10746b157999 (patch)
tree79c01a7fc78eaa5c26da9e722ba018b87d899c8e
parent6f14bf4b4e5cfd81e728277d2f64c915079c2b27 (diff)
feat: feat: ability to hidden summary in home page
-rw-r--r--README-zh_CN.md9
-rw-r--r--README.md9
-rw-r--r--exampleSite/config.yaml8
-rw-r--r--layouts/index.html2
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
diff --git a/README.md b/README.md
index 74b47e9..7ce417d 100644
--- a/README.md
+++ b/README.md
@@ -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 }}