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:
authorJulio Pescador <jpescador@users.noreply.github.com>2016-02-26 09:16:55 +0300
committerJulio Pescador <jpescador@users.noreply.github.com>2016-02-26 09:16:55 +0300
commit5bab819fabc683774e7fe6e3afaff8348e9b8d2e (patch)
tree1d197a254f874560f4f168508f5e2adaeb54986f
parent912fe5e5d1084f545740ce41894881e571fc768e (diff)
Creating logic for view more post on sidebarv0.15
Create new Site Params variable called viewMorePostLink that will set the link in the sidebar for view more posts. If not set, the default value of /post will be used.
-rw-r--r--layouts/partials/sidebar.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 608ee8c..0124502 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -49,7 +49,13 @@
{{ if ge (len (where .Site.Pages "Type" "post")) ($.Scratch.Get "postLimit") }}
<li>
<ul class="actions">
- <li><a href="/post" class="button">View more posts</a></li>
+ <li><a href=
+ {{ with .Site.Params.viewMorePostLink }}
+ {{ . }}
+ {{ else }}
+ "/post"
+ {{ end }}
+ class="button">View more posts</a></li>
</ul>
</li>
{{ end }}