Skip to content

Commit 16243fc

Browse files
agriyakhetarpalstefanv
authored andcommitted
authors, not author for posts metadata
1 parent 1fa2290 commit 16243fc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

layouts/partials/posts/meta.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
{{- if .Params.Author -}}
2+
{{- errorf "Page %q uses deprecated 'author' field. Please use 'authors' instead." .File.Path -}}
3+
{{- end -}}
14
<div class="post-meta">
25
<span class="post-authors">
3-
{{- range .Params.author -}}
6+
{{- range .Params.Authors -}}
47
{{ $author := trim (index (findRE `[^<]*` . 1) 0) "\n\r " }}
58
{{ $handle := index (index (findRESubmatch `<(.*?)>` . 1) 0) 1 }}
69
<div class="post-author">

layouts/partials/section/section.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ <h5 class="subtitle">{{ .Params.Subtitle }}</h5>
99
{{ .Content }}
1010
{{ else }}
1111
{{ range .Pages }}
12+
{{- if .Params.Author -}}
13+
{{- errorf "Page %q uses deprecated 'author' field. Please use 'authors' instead." .File.Path -}}
14+
{{- end -}}
1215
<div class="post-list">
1316
<article>
1417
<div class="post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></div>

0 commit comments

Comments
 (0)