Browse Source

Fixed deprecated warnings (#648)

* Fixed deprecated hugo pagination warnings.
pull/655/head
Noam Alum 7 months ago
committed by GitHub
parent
commit
1c945da5e7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      config.yaml
  2. 10
      layouts/blog/single.html
  3. 3
      layouts/partials/common/opengraph.html

4
config.yaml

@ -3,9 +3,9 @@ languageCode: en-us
title: AlmaLinux title: AlmaLinux
disableKinds: disableKinds:
- taxonomy - taxonomy
- taxonomyTerm
paginate: 15 pagination:
pagerSize: 15
taxonomies: taxonomies:
author: authors author: authors

10
layouts/blog/single.html

@ -46,8 +46,8 @@
{{ if .PrevPage }} {{ if .Prev }}
<a class="al-blog-previous-button " href="{{ .PrevPage.RelPermalink }}"> <a class="al-blog-previous-button " href="{{ .Prev.RelPermalink }}">
<span>« {{ i18n "Previous" }}</span> <span>« {{ i18n "Previous" }}</span>
</a> </a>
@ -56,8 +56,8 @@
{{ if .NextPage }} {{ if .Next }}
<a class="al-blog-next-button " href="{{ .NextPage.RelPermalink }}"> <a class="al-blog-next-button " href="{{ .Next.RelPermalink }}">
<span> {{ i18n "Next" }} »</span> <span> {{ i18n "Next" }} »</span>
</a> </a>
{{ end }} {{ end }}
@ -72,4 +72,4 @@
{{end}} {{end}}

3
layouts/partials/common/opengraph.html

@ -47,14 +47,13 @@
{{ end }}{{ end }} {{ end }}{{ end }}
{{- end }} {{- end }}
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
{{- $facebookAdmin := "" }} {{- $facebookAdmin := "" }}
{{- with site.Params.social }} {{- with site.Params.social }}
{{- if reflect.IsMap . }} {{- if reflect.IsMap . }}
{{- $facebookAdmin = .facebook_admin }} {{- $facebookAdmin = .facebook_admin }}
{{- end }} {{- end }}
{{- else }} {{- else }}
{{- with site.Social.facebook_admin }} {{- with site.Params.social.facebook_admin }}
{{- $facebookAdmin = . }} {{- $facebookAdmin = . }}
{{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
{{- end }} {{- end }}

Loading…
Cancel
Save