mirror of
https://github.com/13hannes11/hugo-coder-timeline.git
synced 2024-09-04 00:50:58 +02:00
Add authors taxonomy for blog posts (#435)
* Add authors taxonomy and layout * Add my name to contributors file * Add authors to front matter post archetypes * Add author to i18n for en * Add authors taxonomy to exampleSite config * Add some author names to exampleSite for demo * Tested authors on pt-br and externally-linked post * Also ran make release again * Resources Deleted resources in exampleSite and added resources in root
This commit is contained in:
9
layouts/partials/taxonomy/authors.html
Normal file
9
layouts/partials/taxonomy/authors.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="authors">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
{{- range $index, $el := . -}}
|
||||
{{- if gt $index 0 }}
|
||||
<span class="separator">•</span>
|
||||
{{- end }}
|
||||
<a href="{{ ( printf "authors/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
@@ -21,6 +21,7 @@
|
||||
{{ i18n "reading_time" .ReadingTime }}
|
||||
</span>
|
||||
</div>
|
||||
{{ with .Page.Params.Authors }}{{ partial "taxonomy/authors.html" . }}{{ end }}
|
||||
{{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }}
|
||||
{{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user