sort tags everywhere
This commit is contained in:
parent
6f8e3cfdb4
commit
165081d97d
|
@ -6,7 +6,7 @@
|
|||
{{ $mscratch.Add "articles" (dict
|
||||
"title" .Title
|
||||
"date" (.Date.Format "2006-01-02")
|
||||
"tags" (or .Params.tags slice)
|
||||
"tags" (sort (or .Params.tags slice))
|
||||
"summary" .Summary
|
||||
"text" (lower .Plain)
|
||||
"link" .Permalink
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<p class="articleTagsContainer">
|
||||
<span> </span>
|
||||
<strong>Tags:</strong>
|
||||
{{ range .Params.tags }}
|
||||
{{ range sort .Params.tags }}
|
||||
<a
|
||||
{{ if site.Params.discreteTags | default false }}
|
||||
class="discreteTag"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{{ $mscratch.Add "articles" (dict
|
||||
"title" .Title
|
||||
"date" (.Date.Format "2006-01-02")
|
||||
"tags" (or .Params.tags slice)
|
||||
"tags" (sort (or .Params.tags slice))
|
||||
"summary" .Summary
|
||||
"link" .Permalink
|
||||
"image" (or .Params.Image "")) }}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<p class="date">
|
||||
<span title="Date"> </span>
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
|
||||
{{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
|
||||
| <!-- Pipe character as visual separator between date and tags-->
|
||||
<span title="Tags"> </span>
|
||||
{{ range .Params.tags }}
|
||||
{{ range sort .Params.tags }}
|
||||
<a href="/tags/{{ . | urlize }}">#{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
|
||||
<br />
|
||||
<span title="Tags"> </span>
|
||||
{{ range .Params.tags }}
|
||||
{{ range sort .Params.tags }}
|
||||
#{{ . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
property="article:published_time"
|
||||
content='{{ .Date.Format "2006-01-02T15:04:05Z-0700" }}' />
|
||||
{{ if .Params.tags }}
|
||||
{{ range .Params.tags }}
|
||||
{{ range sort .Params.tags }}
|
||||
<meta property="article:tag" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<meta name="author" content="{{ .Site.Params.Author }}" />
|
||||
{{ if .IsPage }}
|
||||
{{ if .Params.tags }}
|
||||
<meta name="keywords" content='{{ delimit .Params.tags ", "}}' />
|
||||
<meta name="keywords" content='{{ delimit (sort .Params.tags) ", "}}' />
|
||||
{{ end }}
|
||||
{{ if .Params.description }}
|
||||
<meta name="description" content="{{ .Params.description }}" />
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
|
||||
<div>
|
||||
<h2>
|
||||
<a href="${article.link}">${article.title}</a>
|
||||
<a href="${article.link}">${article.title}</a>
|
||||
</h2>
|
||||
<p class="date">
|
||||
<span title="Date"> </span>
|
||||
|
@ -28,10 +28,12 @@
|
|||
{{ if .Site.Params.imageInArticlePreview }}
|
||||
${renderImage(article.image)}
|
||||
{{end}}
|
||||
<div class="articlePreview">
|
||||
<p>${article.summary}</p>
|
||||
<p><a href="${article.link}">Continue reading </a></p>
|
||||
</div>
|
||||
{{ if (site.Params.articleSummary | default true) }}
|
||||
<div class="articlePreview">
|
||||
<p>${article.summary}</p>
|
||||
<p><a href="${article.link}">Continue reading </a></p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<hr />
|
||||
</article>
|
||||
|
|
Loading…
Reference in New Issue