Feat: change post nav rule at post footer

replace .PrevInSection/.NextInSection with .Prev/.Next
This commit is contained in:
Cell
2023-10-12 17:17:00 +08:00
parent a25331bca3
commit 9b47648aa5
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -19,11 +19,11 @@
{{- end -}}
<link rel="canonical" href="{{ .Permalink }}" />
{{- if .PrevInSection -}}
<link rel="prev" href="{{ .PrevInSection.Permalink }}" />
{{- if .Prev -}}
<link rel="prev" href="{{ .Prev.Permalink }}" />
{{- end -}}
{{- if .NextInSection -}}
<link rel="next" href="{{ .NextInSection.Permalink }}" />
{{- if .Next -}}
<link rel="next" href="{{ .Next.Permalink }}" />
{{- end -}}
{{- with .OutputFormats.Get "RSS" -}}
+2 -2
View File
@@ -74,13 +74,13 @@
</div>
<div class="post-nav">
{{- with .PrevInSection -}}
{{- with .Prev -}}
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="prev" title="{{ .Title }}">
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
{{- .Title -}}
</a>
{{- end -}}
{{ with .NextInSection }}
{{ with .Next }}
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="next" title="{{ .Title }}">
{{- .Title -}}
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}