summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordsrkafuu2022-12-23 09:47:30 +0800
committerdsrkafuu2022-12-23 09:47:30 +0800
commit16c4b8d301e0a81aa29e3c36fc7cd9ff4096d9ff (patch)
treeee7df36029922c0a7012385c0c3ad1c81eb2be3c
parent88a7d85c8677c8f47997c0a692bb9614abe2b612 (diff)
downloadhugo-theme-fuji-16c4b8d301e0a81aa29e3c36fc7cd9ff4096d9ff.tar.gz
hugo-theme-fuji-16c4b8d301e0a81aa29e3c36fc7cd9ff4096d9ff.tar.bz2
hugo-theme-fuji-16c4b8d301e0a81aa29e3c36fc7cd9ff4096d9ff.zip
feat: hide no tag list
-rw-r--r--README.md2
-rw-r--r--README_CN.md2
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/post-meta.html2
4 files changed, 4 insertions, 3 deletions
diff --git a/README.md b/README.md
index 91b8be0..9f6c6d1 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
Fuji is a minimal Hugo theme with full dark mode support and GitHub Primer markdown style.
![GitHub release](https://img.shields.io/github/v/release/dsrkafuu/hugo-theme-fuji)
-![GitHub build status](https://img.shields.io/github/workflow/status/dsrkafuu/hugo-theme-fuji/build-test)
+![GitHub build status](https://img.shields.io/github/workflow/status/dsrkafuu/hugo-theme-fuji/pages)
![GitHub license](https://img.shields.io/github/license/dsrkafuu/hugo-theme-fuji)
[English](https://github.com/dsrkafuu/hugo-theme-fuji#readme) | [简体中文](https://github.com/dsrkafuu/hugo-theme-fuji/blob/master/README_CN.md)
diff --git a/README_CN.md b/README_CN.md
index 786b401..1258f0d 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -3,7 +3,7 @@
简单的 Hugo 主题,支持夜间模式,Markdown 样式来自 GitHub Primer。
![GitHub release](https://img.shields.io/github/v/release/dsrkafuu/hugo-theme-fuji)
-![GitHub build status](https://img.shields.io/github/workflow/status/dsrkafuu/hugo-theme-fuji/build-test)
+![GitHub build status](https://img.shields.io/github/workflow/status/dsrkafuu/hugo-theme-fuji/pages)
![GitHub license](https://img.shields.io/github/license/dsrkafuu/hugo-theme-fuji)
[English](https://github.com/dsrkafuu/hugo-theme-fuji#readme) | [简体中文](https://github.com/dsrkafuu/hugo-theme-fuji/blob/master/README_CN.md)
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index f6ebc75..70b0999 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -51,6 +51,7 @@ sourceURL = "https://github.com/dsrkafuu/hugo-theme-fuji"
# Word counter and read time indicator in post metadata
showWordCounter = true
showReadTime = false
+hideNoTagList = false
# License in the footer
showLicenseInFooter = false
diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html
index e025dd6..061e6cf 100644
--- a/layouts/partials/post-meta.html
+++ b/layouts/partials/post-meta.html
@@ -2,4 +2,4 @@
{{ if ne .Date.YearDay .Lastmod.YearDay }}<span><i class="iconfont icon-sync-circle-sharp"></i>&nbsp;{{ dateFormat ( or $.Site.Params.dateFormat "2006-01-02" ) $.Page.Params.LastMod }}</span>{{ end }}
{{ if .Site.Params.showWordCounter }}<span><i class="iconfont icon-file-tray-sharp"></i>&nbsp;{{ i18n "postMetaWordCount" .WordCount}}</span>{{ end }}
{{ if .Site.Params.showReadTime }}<span><i class="iconfont icon-time-sharp"></i>&nbsp;{{ i18n "postMetaReadingTime" .ReadingTime }}</span>{{ end }}
-<span><i class="iconfont icon-pricetags-sharp"></i>&nbsp;{{ if .Params.tags }}{{ range .Params.tags }}<a href="{{ "tags/" | relURL }}{{ . | urlize}}">{{ . }}</a>&nbsp;{{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }}</span>
+{{ if and (not .Params.tags) .Site.Params.hideNoTagList }}{{ else }}<span><i class="iconfont icon-pricetags-sharp"></i>&nbsp;{{ if .Params.tags }}{{ range .Params.tags }}<a href="{{ "tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>&nbsp;{{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }}</span>{{ end }}