Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r--layouts/partials/sidebar.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 74e607c..d872e75 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -93,8 +93,13 @@
{{ range $key, $value := $.Scratch.Get "categories" }}
<article>
<header>
- <a href="/categories/{{ $value.Name | urlize }}/">{{ $value.Name }}</a>
- <span style="float:right;">{{ $value.Count }}</span>
+ {{ if ne $value.Name "" }}
+ <a href="/categories/{{ $value.Name | urlize }}/">{{ $value.Name }}</a>
+ <span style="float:right;">{{ $value.Count }}</span>
+ {{ else }}
+ Uncategorized
+ <span style="float:right;">{{ $value.Count }}</span>
+ {{ end }}
</header>
</article>
{{ end }}