feat: Support to show the author of the article
This commit is contained in:
parent
d4ba47cd21
commit
332ee3cb2d
7 changed files with 43 additions and 8 deletions
|
@ -20,14 +20,22 @@
|
|||
<li><a href="{{ $cat.Permalink }}">{{ $cat.Title | default $cat_name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if .Params.tags }}
|
||||
<ul class="post-tags">
|
||||
{{ range $tag_name := .Params.tags }}
|
||||
{{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name)) }}
|
||||
<li><a href="{{ $tag.Permalink }}">#{{ $tag.Title | default $tag_name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if .Params.tags }}
|
||||
<ul class="post-tags">
|
||||
{{ range $tag_name := .Params.tags }}
|
||||
{{ $tag := ($.Site.GetPage (printf "/tags/%s" $tag_name)) }}
|
||||
<li><a href="{{ $tag.Permalink }}">#{{ $tag.Title | default $tag_name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if .Params.authors }}
|
||||
<ul class="post-authors">
|
||||
{{ range $author_name := .Params.authors }}
|
||||
{{ $author := ($.Site.GetPage (printf "/authors/%s" $author_name)) }}
|
||||
<li><a href="{{ $author.Permalink }}">@{{ $author_name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue