blog: add multiple author support for posts
This commit is contained in:
parent
e5e8c13f23
commit
820c565d21
@ -8,7 +8,7 @@ authors:
|
||||
- Benjamin A. Petersen
|
||||
image: https://images.unsplash.com/photo-1618075254460-429d47b887c7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2148&q=80
|
||||
excerpt: "With v0.25.0 you get external certificate management for the impersonation proxy, easier scheduling of the kube-cert-agent, and more"
|
||||
tags: ['Joshua T. Casey','Ryan Richard', 'Benjamin Petersen', 'release', 'kubernetes', 'pki', 'pinniped', 'tls', 'mtls', 'kind', 'contour', 'cert-manager']
|
||||
tags: ['Joshua T. Casey','Ryan Richard', 'Benjamin A. Petersen', 'release', 'kubernetes', 'pki', 'pinniped', 'tls', 'mtls', 'kind', 'contour', 'cert-manager']
|
||||
---
|
||||
|
||||
![Friendly seal](https://images.unsplash.com/photo-1618075254460-429d47b887c7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2148&q=80)
|
||||
|
@ -9,9 +9,7 @@
|
||||
<div class="wrapper blog">
|
||||
<div class="blog-post">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<p class="author">
|
||||
<a href="/tags/{{ .Params.author | urlize }}">{{ .Params.author }}</a>
|
||||
</p>
|
||||
{{ partial "authors" .}}
|
||||
<p class="date">{{ dateFormat "Jan 2, 2006" .Date }}</p>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
11
site/themes/pinniped/layouts/partials/authors.html
Normal file
11
site/themes/pinniped/layouts/partials/authors.html
Normal file
@ -0,0 +1,11 @@
|
||||
<p class="author">
|
||||
{{ if (isset .Params "authors") }}
|
||||
{{ $authsCount := .Params.authors | len }}
|
||||
{{ $commaCount := sub $authsCount 2 }}
|
||||
{{ range $i, $author := .Params.authors -}}
|
||||
<a href="/tags/{{ $author | urlize }}">{{ $author }}</a>{{ if le $i $commaCount }},{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<a href="/tags/{{ .Params.author | urlize }}">{{ .Params.author }}</a>
|
||||
{{ end }}
|
||||
</p>
|
@ -5,7 +5,6 @@
|
||||
<div class="content">
|
||||
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
<p class="no-margin">{{ .Params.author }}</p>
|
||||
<p>{{ .Params.Excerpt }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user