diff options
author | Hang Jiang <jianghangscu@gmail.com> | 2021-08-16 11:05:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-16 11:05:24 +0300 |
commit | 4ff6baaf6c61b8cf48eaaa331727570d03fd622d (patch) | |
tree | 79c01a7fc78eaa5c26da9e722ba018b87d899c8e | |
parent | 925467c448aac192afd45520cdb95d83bcf67cc1 (diff) | |
parent | 6cf25f8a16b376204cb4b9ca553a10746b157999 (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.md | 9 | ||||
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | exampleSite/config.yaml | 6 | ||||
-rw-r--r-- | exampleSite/content/posts/test.md | 11 | ||||
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | static/css/style.css | 3 |
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 @@ -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 { |