feat(user): add index of authors

Close #943
This commit is contained in:
George Cushen committed 2019-02-17 22:34:21 +00:00
1 parent cbeca239dc
commit bf696662e5
1 file changed
+30
+30
View File
@@ -0,0 +1,30 @@
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
{{ partial "page_header.html" . }}
<div class="universal-wrapper">
{{ with .Content }}
<div class="article-style" itemprop="articleBody">{{ . }}</div>
{{ end }}
<ul>
{{ $paginator := .Paginate .Data.Pages }}
{{ range $k, $v := $paginator.Pages }}
{{ $person_page_path := (printf "/author/%s" (urlize $v.Title)) }}
{{ $person_page := $.Site.GetPage $person_page_path }}
{{ $name := "" }}
{{ if $person_page }}
{{ $person := $person_page.Params }}
{{ $name = $person.name }}
{{ else }}
{{ $name = $v.Title | plainify }}
{{ end }}
<li><a href="{{ $v.Permalink }}">{{ $name }}</a></li>
{{ end }}
</ul>
{{ partial "pagination" . }}
</div>
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}