From 16c4b8d301e0a81aa29e3c36fc7cd9ff4096d9ff Mon Sep 17 00:00:00 2001
From: dsrkafuu
Date: Fri, 23 Dec 2022 09:47:30 +0800
Subject: feat: hide no tag list
---
README.md | 2 +-
README_CN.md | 2 +-
exampleSite/config.toml | 1 +
layouts/partials/post-meta.html | 2 +-
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.

-
+

[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。

-
+

[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 }} {{ dateFormat ( or $.Site.Params.dateFormat "2006-01-02" ) $.Page.Params.LastMod }}{{ end }}
{{ if .Site.Params.showWordCounter }} {{ i18n "postMetaWordCount" .WordCount}}{{ end }}
{{ if .Site.Params.showReadTime }} {{ i18n "postMetaReadingTime" .ReadingTime }}{{ end }}
- {{ if .Params.tags }}{{ range .Params.tags }}{{ . }} {{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }}
+{{ if and (not .Params.tags) .Site.Params.hideNoTagList }}{{ else }} {{ if .Params.tags }}{{ range .Params.tags }}{{ . }} {{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }}{{ end }}
--
cgit v1.2.3