Skip to content

Commit fc5bf57

Browse files
committed
Use Page.Eq method to compare page objects
1 parent c079875 commit fc5bf57

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

layouts/partials/nav-list-hier.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
{{- if eq (.this.Params.build.list | default "always") "always" }}
4545
<li><a href="{{ .this.RelPermalink }}"
46-
{{- if eq .this .currentPage }} class="active"{{- end -}}>
46+
{{- if .this.Eq .currentPage }} class="active"{{- end -}}>
4747
{{- markdownify .this.Title -}}
4848
</a></li>
4949
{{- end }}

layouts/partials/post-pagination.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{{- $next := false }}
1616

1717
{{- range $i, $page := $pages }}
18-
{{- if eq $page $currentPage }}
18+
{{- if $page.Eq $currentPage }}
1919
{{- $prev = index $pages (sub $i 1) }}
2020
{{- $next = index $pages (add $i 1) }}
2121
{{- end }}

0 commit comments

Comments
 (0)