diff --git a/layouts/_default/single.html b/layouts/_default/single.html index db2374a..c73680f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -37,25 +37,7 @@ {{- end }} {{- if (.Param "ShowPostNavLinks") }} - {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} - {{- if and (gt (len $pages) 1) (in $pages . ) }} - - {{- end }} + {{- partial "post_nav_links.html" . }} {{- end }} {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }} {{- partial "share_icons.html" . -}} diff --git a/layouts/partials/post_nav_links.html b/layouts/partials/post_nav_links.html new file mode 100644 index 0000000..b988641 --- /dev/null +++ b/layouts/partials/post_nav_links.html @@ -0,0 +1,19 @@ +{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- if and (gt (len $pages) 1) (in $pages . ) }} + +{{- end }}