From 2569706cd4915f860fefbc4ecf6eff71995786c7 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 31 Dec 2023 15:34:38 +0000 Subject: [PATCH] Hermit-V2 Theme Update --- assets/scss/style.scss | 9 ++++++++- hugo.toml.example | 3 +++ layouts/partials/posts_single_info.html | 3 +++ layouts/partials/svg.html | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 80686cc..24562f4 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -678,7 +678,14 @@ a.footnote-ref { margin-right: .5em; &::before { - content: "#" + {{- with .Site.Params.tagSymbol | default "#" -}}content: "{{ . }}"{{- end -}} + } + } + .category { + margin-right: .5em; + + &::before { + {{- with .Site.Params.categorySymbol | default "⊲" -}}content: "{{ . }}"{{- end -}} } } } diff --git a/hugo.toml.example b/hugo.toml.example index 4a1db72..a56ed87 100644 --- a/hugo.toml.example +++ b/hugo.toml.example @@ -55,6 +55,7 @@ enableEmoji = true [taxonomies] tag = "tags" # Categories are disabled by default. + # category = "categories" [params] dateform = "Jan 2, 2006" @@ -84,6 +85,8 @@ enableEmoji = true # legacyLayout = false shareSocial = true # googleTagManager = "GTM-XXXXXXXX" + # tagSymbol = "#" + # categorySymbol = "⊲" [[params.socialLinks]] name = "mastodon" diff --git a/layouts/partials/posts_single_info.html b/layouts/partials/posts_single_info.html index fb695cd..4c0b313 100644 --- a/layouts/partials/posts_single_info.html +++ b/layouts/partials/posts_single_info.html @@ -6,6 +6,9 @@ {{- with .Params.tags }}

{{- partial "svg.html" (dict "context" . "name" "posts_single_tags") -}}{{- range . -}}{{.}}{{- end }}

{{- end }} +{{- with .Params.categories }} +

{{- partial "svg.html" (dict "context" . "name" "posts_single_categories") -}}{{- range . -}}{{.}}{{- end }}

+{{- end }}

{{- partial "svg.html" (dict "context" . "name" "posts_single_wordcount") }}{{ i18n "wordCount" . -}} {{- partial "readTime.html" . -}}

{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local -}} {{- if and (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) -}} diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 4ae8038..a840124 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -88,6 +88,8 @@ {{- else if (eq .name "posts_single_git_commit") -}} +{{- else if (eq .name "posts_single_categories") -}} + {{- else if (eq .name "posts_single_tags") -}} {{- else if (eq .name "share") -}}