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

github.com/thingsym/hugo-theme-techdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthingsym <thingsym@gmail.com>2018-11-27 17:05:40 +0300
committerthingsym <thingsym@gmail.com>2018-11-27 17:05:55 +0300
commitc76f41cc1fbb7315f9e7ece7ad6bfd170bc62509 (patch)
tree83e1781e0ad855f703ccf9a40c213c1cab119d37 /layouts
parentfabdb9e84ebff54363a3040ae6edbf94e00c3e9e (diff)
fix: in the case of IsHome, eliminate the previous pagination link
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/pagination.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
index c98d39b..7837118 100644
--- a/layouts/partials/pagination.html
+++ b/layouts/partials/pagination.html
@@ -15,19 +15,21 @@
{{- if hasPrefix $currentNode.URL .menu.URL -}}
{{- $currentNode.Scratch.Set "NextPageOK" "OK" -}}
- {{- $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") -}}
+ {{- if .menu.IsHome -}}
+ {{- $currentNode.Scratch.Set "prevPage" "" -}}
+ {{- else -}}
+ {{- $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") -}}
+ {{- end -}}
{{- else -}}
{{- if eq ($currentNode.Scratch.Get "NextPageOK") "OK" -}}
{{- $currentNode.Scratch.Set "NextPageOK" nil -}}
{{ if in $menu_exclusion .menu.Section }}
{{- else -}}
-
{{- $currentNode.Scratch.Set "nextPage" .menu -}}
{{- end -}}
{{- end -}}
{{- end -}}
-
{{- $currentNode.Scratch.Set "prevPageTmp" .menu -}}
{{- $currentNode.Scratch.Set "pages" .menu.Pages -}}
{{- if .menu.IsHome -}}