refactor: replace deprecated resources.toCss and .Site.Author references

This commit is contained in:
Ben Goldsworthy 2025-01-04 19:45:00 +01:00
parent 1451b66949
commit b07a2a6cf5
Signed by: Rumperuu
SSH key fingerprint: SHA256:e5XfzNOr9UvWpEzyLfw0GtTMZWIFh3NmxH+/qQIi3xE
5 changed files with 11 additions and 11 deletions

View file

@ -29,10 +29,10 @@
<link href="/css/sanitize.css" rel="stylesheet" />
{{- $mainStylesheet := resources.Get "css/main.scss" }}
{{- $mainStylesheet := $mainStylesheet | resources.ToCSS | resources.Fingerprint }}
{{- $mainStylesheet := $mainStylesheet | css.Sass | resources.Fingerprint }}
<link rel="stylesheet" type="text/css" href="{{ $mainStylesheet.Permalink }}" integrity="{{ $mainStylesheet.Data.Integrity | html }}">
{{- $printStylesheet := resources.Get "css/print.scss" }}
{{- $printStylesheet := $printStylesheet | resources.ToCSS | resources.Fingerprint }}
{{- $printStylesheet := $printStylesheet | css.Sass | resources.Fingerprint }}
<link rel="stylesheet" media="print" href="{{ $printStylesheet.Permalink }}" integrity="{{ $printStylesheet.Data.Integrity | html }}">
{{- if .Param "math" -}}
@ -58,7 +58,7 @@
{{- block "footer" . -}}
<footer class="site-footer">
<p>
By <a href="/">{{ $.Site.Author.name }}</a> |
By <a href="/">{{ $.Site.Params.Author.name }}</a> |
<a href="{{ $.Site.Params.codeURL }}{{ $.Site.Params.reportIssueURL }}">Report an Issue</a> |
<a href="{{ relref . "privacy-policy" }}">Privacy Policy</a> |
<a href="/{{ .Sitemap.Filename }}">Sitemap</a> |

View file

@ -17,8 +17,8 @@
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
{{ with .Site.Author.email }}<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}
{{ with .Site.Author.email }}<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
{{ with .Site.Params.Author.email }}<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}
{{ with .Site.Params.Author.email }}<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
@ -29,7 +29,7 @@
<title>{{ .Title | plainify }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
</item>