mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: add titleIcon font matter (#421)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{- define "title" -}}
|
||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
|
||||
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}}
|
||||
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -8,8 +8,12 @@
|
||||
<div class="header">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animate__animated animate__pulse animate__faster">
|
||||
{{- dict "Class" "fa-solid fa-feather fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} <sup>{{ .Pages.Len }}</sup>
|
||||
{{- $titleIcon := "fa-solid fa-feather" -}}
|
||||
{{- with .Params.titleIcon -}}
|
||||
{{- $titleIcon = . -}}
|
||||
{{- end -}}
|
||||
{{- dict "Class" (add $titleIcon " fa-fw me-1") | partial "plugin/icon.html" -}}
|
||||
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} <sup>{{ .Pages.Len }}</sup>
|
||||
</h1>
|
||||
{{- /* Total word count */ -}}
|
||||
{{- /* See https://github.com/hugo-fixit/FixIt/issues/124 */ -}}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
||||
<channel>
|
||||
<title>
|
||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
|
||||
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}}
|
||||
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
|
||||
</title>
|
||||
<link>
|
||||
{{- .Permalink -}}
|
||||
</link>
|
||||
<description>
|
||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} | {{ .Site.Title -}}
|
||||
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} | {{ .Site.Title -}}
|
||||
</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{- with .Site.LanguageCode -}}
|
||||
|
||||
Reference in New Issue
Block a user