diff options
author | amzrk2 | 2020-04-15 16:19:19 +0800 |
---|---|---|
committer | amzrk2 | 2020-04-15 16:19:19 +0800 |
commit | b4e6be8688ec5b41e27c3d0977a5831315740f32 (patch) | |
tree | d4e514c3de0a09cac11ca99152446d3001e5554b | |
parent | edb8d453c866afcfc841e744535015f6d139a7cd (diff) | |
download | hugo-theme-fuji-b4e6be8688ec5b41e27c3d0977a5831315740f32.tar.gz hugo-theme-fuji-b4e6be8688ec5b41e27c3d0977a5831315740f32.tar.bz2 hugo-theme-fuji-b4e6be8688ec5b41e27c3d0977a5831315740f32.zip |
Remove taxonomyTerm using disableKinds
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | exampleSite/config.toml | 5 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/tags/list.html | 4 |
4 files changed, 6 insertions, 7 deletions
@@ -16,7 +16,7 @@ A minimal Hugo theme inspired by [printempw](https://github.com/printempw/)'s He - [ ] Custom pagination - [ ] Archive page -- [ ] Analytics +- [x] Analytics - [ ] SEO optimization - [ ] Better mobile devices support - [ ] Multilingual diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9e7c4d5..795d412 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,7 +4,7 @@ languageCode = "zh-Hans" theme = "fuji" hasCJKLanguage = true -disableKinds = ["RSS"] +disableKinds = ["RSS", "taxonomyTerm"] summaryLength = 100 # Custom cummary length, add <!--more--> in post file to custom split point paginate = 10 @@ -15,6 +15,9 @@ paginate = 10 [params] subTitle = "This is a Sub Title" + # Posts shown in homepage + mainSections = ["post"] + # Google Analytics googleAnalyticsUA = "UA-000000000-0" diff --git a/layouts/index.html b/layouts/index.html index ddc93f1..ef083bc 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,7 +4,7 @@ <!-- list --> <div class="col-md-9 col-12 float-left" id="content"> <!-- homepage range in posts --> - {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }} <div id="post"> <h2 id="post-title"> diff --git a/layouts/tags/list.html b/layouts/tags/list.html index 0b58a6d..c58d1c3 100644 --- a/layouts/tags/list.html +++ b/layouts/tags/list.html @@ -4,9 +4,6 @@ <!-- list --> <div class="col-md-9 col-12 float-left" id="content"> <!-- tags page range in posts --> - {{ if eq .RelPermalink "/tags/" }} - <span id="not-found">404 NOT FOUND</span> - {{ else }} <div id="page-tag"> <span>拥有标签 {{ .Title }} 的文章:</span> </div> @@ -26,7 +23,6 @@ </div> </div> {{ end }} - {{ end }} {{ if gt .Paginator.TotalPages 1 }} <div id="pagination"> {{ template "_internal/pagination.html" . }} |