mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-09 19:00:34 -05:00
Added most popular tag to stats page
This commit is contained in:
parent
71d9811eb8
commit
5be5ad26d3
1 changed files with 11 additions and 0 deletions
|
@ -28,6 +28,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Most Popular tag -->
|
||||||
|
{{ $mostPopularTag := index .Site.Taxonomies.tags.ByCount 0 }}
|
||||||
|
|
||||||
{{ $wordCount := $scratch.Get "wordcount" }}
|
{{ $wordCount := $scratch.Get "wordcount" }}
|
||||||
{{ $avgPostLength := div $wordCount $postCount }}
|
{{ $avgPostLength := div $wordCount $postCount }}
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -47,6 +50,14 @@
|
||||||
<td>Number of Topics</td>
|
<td>Number of Topics</td>
|
||||||
<td>{{ len $tags | lang.NumFmt 0 }}</td>
|
<td>{{ len $tags | lang.NumFmt 0 }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Most Popular Topic</td>
|
||||||
|
<td>
|
||||||
|
{{ with $mostPopularTag }}
|
||||||
|
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> with {{ .Count }} posts
|
||||||
|
{{ end }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Longest Post Published</td>
|
<td>Longest Post Published</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in a new issue