feat: faster, support custom lib cdn and more standardized code style
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
|
||||
{{ define "title" }}{{ .Title }} | {{ T .Data.Singular | default (humanize .Data.Singular) }} | {{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ $taxonomy := .Data.Singular }}
|
||||
{{ $taxonomyName := $taxonomy }}
|
||||
{{ if eq $taxonomy "tag"}}
|
||||
{{ $taxonomyName = (T "tag") }}
|
||||
{{ else if eq $taxonomy "category"}}
|
||||
{{ $taxonomyName = (T "category") }}
|
||||
{{ end }}
|
||||
<div class="post-warp archive">
|
||||
<h2 class="post-title">
|
||||
{{- printf "%s - %s" $taxonomyName .Title -}}
|
||||
{{ $taxonomy := .Data.Singular }}
|
||||
{{ if eq $taxonomy "category" }}
|
||||
<i class="far fa-folder-open"></i> {{ .Title }}
|
||||
{{ else if eq $taxonomy "tag" }}
|
||||
<i class="fas fa-tag"></i> {{ .Title }}
|
||||
{{ else }}
|
||||
{{ printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title }}
|
||||
{{ end }}
|
||||
</h2>
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<h3>{{ .Key }}</h3>
|
||||
|
||||
Reference in New Issue
Block a user