From b4e6be8688ec5b41e27c3d0977a5831315740f32 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Wed, 15 Apr 2020 16:19:19 +0800 Subject: Remove taxonomyTerm using disableKinds --- README.md | 2 +- exampleSite/config.toml | 5 ++++- layouts/index.html | 2 +- layouts/tags/list.html | 4 ---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7399b2d..25cd813 100644 --- a/README.md +++ b/README.md @@ -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 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 @@
- {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }}

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 @@
- {{ if eq .RelPermalink "/tags/" }} - 404 NOT FOUND - {{ else }}
拥有标签 {{ .Title }} 的文章:
@@ -26,7 +23,6 @@

{{ end }} - {{ end }} {{ if gt .Paginator.TotalPages 1 }}