Skip to content

Commit

Permalink
exclude search page from pager
Browse files Browse the repository at this point in the history
Signed-off-by: weru <[email protected]>
  • Loading branch information
onweru authored and hupfdule committed May 25, 2023
1 parent c038893 commit cbaad27
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions layouts/partials/pager.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<div class="pager{{ if .Next }}{{ else }} pager_lean{{ end }}">
{{- $searchURL := "/search/" }}
{{ with .Site.RegularPages.Next . }}
<div class="pager_item prev">
<!-- <span class="pager_meta">PREVIOUS</span> -->
<a href="{{ .Permalink }}" class="pager_link button" title="{{ .Title }}" rel="prev">
<span class="pager_label">{{ .Title }}</span>
</a>
</div>
{{ if ne .RelPermalink $searchURL }}
<div class="pager_item prev">
<a href="{{ .Permalink }}" class="pager_link button" title="{{ .Title }}" rel="prev">
<span class="pager_label">{{ .Title }}</span>
</a>
</div>
{{ end }}
{{ end }}

{{ with .Site.RegularPages.Prev . }}
<div class="pager_item next">
<!-- <span class="pager_meta">NEXT</span> -->
<a href="{{ .Permalink }}" class="pager_link button" title="{{ .Title }}" rel="next">
<span class="pager_label">{{ .Title }}</span>
</a>
</div>
{{ if ne .RelPermalink $searchURL }}
<div class="pager_item next">
<a href="{{ .Permalink }}" class="pager_link button" title="{{ .Title }}" rel="next">
<span class="pager_label">{{ .Title }}</span>
</a>
</div>
{{ end }}
{{ end }}
</div>
{{ partialCached "sprites" . }}

0 comments on commit cbaad27

Please sign in to comment.