mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 05:15:58 -06:00
Use a new authors array instead of a string
This commit is contained in:
parent
7ffa6c068c
commit
fe4d0979d6
@ -2,11 +2,13 @@
|
||||
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
date: {{ .Date | time.Format "2006-01-02" }}
|
||||
author: {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
||||
toc: true
|
||||
comments: true
|
||||
draft: true
|
||||
|
||||
authors:
|
||||
- {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
||||
|
||||
tags:
|
||||
- awesome
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
---
|
||||
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
author: {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
||||
menu: main
|
||||
toc: true
|
||||
comments: false
|
||||
|
||||
authors:
|
||||
- {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
|
||||
|
||||
---
|
||||
|
||||
This page is about something. All the content before the "more" HTML comment
|
||||
|
@ -20,7 +20,17 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $authorString := "" }}
|
||||
|
||||
{{ with .Params.authors }}
|
||||
{{ $authorString = delimit . ", " }}
|
||||
{{ else }}
|
||||
{{ with .Params.author }}
|
||||
{{ $authorString = . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $authorString }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "user-circle" }}
|
||||
{{ . }}
|
||||
|
Loading…
Reference in New Issue
Block a user