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:
authorHang Jiang <jianghangscu@gmail.com>2021-08-16 11:05:24 +0300
committerGitHub <noreply@github.com>2021-08-16 11:05:24 +0300
commit4ff6baaf6c61b8cf48eaaa331727570d03fd622d (patch)
tree79c01a7fc78eaa5c26da9e722ba018b87d899c8e
parent925467c448aac192afd45520cdb95d83bcf67cc1 (diff)
parent6cf25f8a16b376204cb4b9ca553a10746b157999 (diff)
Merge pull request #102 from nodejh/feature/disable-summary-in-home-page
Feature: disable summary in home page
-rw-r--r--README-zh_CN.md9
-rw-r--r--README.md9
-rw-r--r--exampleSite/config.yaml6
-rw-r--r--exampleSite/content/posts/test.md11
-rw-r--r--layouts/index.html4
-rw-r--r--static/css/style.css3
6 files changed, 38 insertions, 4 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 53cb813..b5caf30 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -53,12 +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 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/exampleSite/content/posts/test.md b/exampleSite/content/posts/test.md
index 20b6065..f82c40e 100644
--- a/exampleSite/content/posts/test.md
+++ b/exampleSite/content/posts/test.md
@@ -39,6 +39,17 @@ aaaa
## t3
+1. One<br><br>
+
+/```
+testing
+some
+code
+/```
+
+2. Two<br><br>
+3. Three<br><br>
+
超宽显示 `var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";var a = "text";` 超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示超宽显示 `var a = "text";`
```
diff --git a/layouts/index.html b/layouts/index.html
index 81c02a9..2db56a3 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -14,7 +14,9 @@
<div class="date">{{ $date }}</div>
</div>
- <div class="summary">{{ $summary | plainify | htmlUnescape }}</div>
+ {{ if ne .Site.Params.hiddenPostSummaryInHomePage true }}
+ <div class="summary">{{ $summary | plainify | htmlUnescape }}</div>
+ {{ end }}
</section>
{{ end }}
diff --git a/static/css/style.css b/static/css/style.css
index e197a60..b6e9040 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -281,7 +281,7 @@ nav.navigation a.button {
}
#list-page .item {
- margin: 48px 0 0 0;
+ margin: 12px 0;
}
#list-page .title {
@@ -316,6 +316,7 @@ nav.navigation a.button {
margin-top: 12px;
word-break: normal;
overflow-wrap: anywhere;
+ margin-bottom: 36px;
}
#list-page .cover {