File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
themes/brevis/layouts/blog Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ {{- define "main" }}
2
+ < article >
3
+ < h1 > {{ .Title | safeHTML }}</ h1 >
4
+ < p >
5
+ Published < time datetime ="{{ .Date.Format "2006-01-02 " }}"> {{ .Date.Format "2006-01-02" }}</ time >
6
+ by
7
+ {{- with .Params.authors }}
8
+ {{- range $index, $author := . }}
9
+ {{- if $index }}, {{ end }}
10
+ {{- $.Scratch.Set "found" false }}
11
+ {{- range $key, $val := site.Data.people }}
12
+ {{- if eq $val.name $author }}
13
+ {{- $.Scratch.Set "found" true }}
14
+ < a rel ="author " href ="{{ $val.web }} "> {{ $val.name }}</ a >
15
+ {{- end }}
16
+ {{- end }}
17
+ {{- if not ($.Scratch.Get "found") }}
18
+ < span > {{ $author }}</ span >
19
+ {{- end }}
20
+ {{- end }}
21
+ {{- end }}
22
+ </ p >
23
+ {{- .Content }}
24
+ </ article >
25
+ {{- end }}
You can’t perform that action at this time.
0 commit comments