forked from matcornic/hugo-theme-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tags: split taxonomy and terms templates matcornic#530
- Loading branch information
Showing
3 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
{{- partial "_taxonomy.html" . }} | ||
{{- partialCached "page-meta.hugo" . .RelPermalink }} | ||
{{- partial "header.html" . }} | ||
<article> | ||
{{- $page := . }} | ||
|
||
{{- $title := i18n .Data.Plural }} | ||
{{- if not $title }} | ||
{{- $title = .Data.Plural | humanize }} | ||
{{- end }} | ||
<h1 id="{{ $title | anchorize }}">{{ $title }}</h1> | ||
<ul> | ||
{{- range .Data.Terms.Alphabetical }} | ||
{{- $c:=""}}{{/* display terms of a taxonomy */}} | ||
{{- $len := 0 }} | ||
{{- range .Pages }} | ||
{{- $c:=""}}{{/* count pages of term */}} | ||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }} | ||
{{- $len = add $len 1 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if $len }} | ||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Page.Title }}</a> ({{ $len }})</li> | ||
{{- end }} | ||
{{- end }} | ||
</ul> | ||
|
||
<footer class="footline"> | ||
</footer> | ||
</article> | ||
{{- partial "footer.html" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{- partialCached "page-meta.hugo" . .RelPermalink }} | ||
{{- partial "header.html" . }} | ||
<article> | ||
{{- $page := . }} | ||
|
||
{{- $title := i18n .Data.Singular }} | ||
{{- if not $title }} | ||
{{- $title = .Data.Singular | humanize }} | ||
{{- end }} | ||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (.Title | humanize) }} | ||
<h1 id="{{ $title | anchorize }}">{{ $title }}</h1> | ||
<ul> | ||
{{- range sort .Pages "Title" }} | ||
{{- $c:=""}}{{/* display pages of a term */}} | ||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }} | ||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a></li> | ||
{{- end }} | ||
{{- end }} | ||
</ul> | ||
|
||
<footer class="footline"> | ||
</footer> | ||
</article> | ||
{{- partial "footer.html" . }} |
This file was deleted.
Oops, something went wrong.