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