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

github.com/curttimson/hugo-theme-dopetrope.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/nav.html')
-rw-r--r--layouts/partials/nav.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 260cc1c..bb524a7 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -5,14 +5,17 @@
<li>
<a href="{{ .Site.BaseURL }}#portfolio">My Portfolio</a>
</li>
+ {{ $blogPosts := first 5 (where .Site.Pages "Type" .Site.Params.Blog.foldername) }}
+ {{ if $blogPosts }}
<li>
<a href="{{ .Site.BaseURL }}{{ .Site.Params.Blog.foldername }}">{{ .Site.Params.Blog.title }}</a>
<ul>
- {{ range first 5 (where .Site.Pages "Type" .Site.Params.Blog.foldername) }}
+ {{ range $blogPosts }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</li>
+ {{ end }}
<li><a href="{{ .Site.BaseURL }}#contact">Contact</a></li>
</ul>
</nav> \ No newline at end of file