Skip to content

Commit

Permalink
Fix hugo update problems
Browse files Browse the repository at this point in the history
  • Loading branch information
89Q12 committed Oct 18, 2024
1 parent aabe0b0 commit 7e9df74
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set Up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'v0.124.0' # You can specify a specific Hugo version here
hugo-version: 'latest' # You can specify a specific Hugo version here

- name: Build Hugo Site
run: hugo --minify
Expand Down
6 changes: 3 additions & 3 deletions layouts/_default/list.atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
<link href="{{ .Permalink }}feed.xml" rel="self"/>
<link href="{{ .Permalink }}"/>{{ if not .Date.IsZero }}
<updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>{{ end }}
<id>{{ .Permalink }}</id>{{ with .Site.Author.name }}
<id>{{ .Permalink }}</id>{{ with .Site.Params.Author.name }}
<author>
<name>{{.}}</name>{{ with $.Site.Author.email }}
<name>{{.}}</name>{{ with $.Site.Params.Author.email }}
<email>{{.}}</email>{{end}}
</author>{{end}}
<generator>Hugo -- gohugo.io</generator>{{ range $pages }}
<entry>
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
<link href="{{ .Permalink }}"/>
<id>{{ .Permalink }}</id>{{ with $.Site.Author.name }}
<id>{{ .Permalink }}</id>{{ with $.Site.Params.Author.name }}
<author>
<name>{{.}}</name>
</author>{{end}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.json.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $.Scratch.Add "index" slice -}}
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}}
{{- range $pages -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "author" .Site.Author "site" .Site.BaseURL "title" .Title "date" .Date "content" .Plain "tags" .Params.tags "categories" .Params.tags) -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "author" .Site.Params.Author "site" .Site.BaseURL "title" .Title "date" .Date "content" .Plain "tags" .Params.tags "categories" .Params.tags) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}
8 changes: 4 additions & 4 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<link>{{ .Permalink }}</link>
<description>Read the latest {{ if ne .Title .Site.Title }}{{ with .Title }} {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ 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.Copyright }}
<language>{{.}}</language>{{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" -}}
Expand All @@ -30,7 +30,7 @@
<title>{{ .Title }}</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>
<content:encoded>
Expand Down
6 changes: 3 additions & 3 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<div class="flex properties__row ">
<div rel="author" class="flex left p-author h-card">
<img class="u-photo"
src="{{ with $.Site.Author.image }}{{ . | absURL }}{{ else }}https://picsum.photos/120.webp{{ end }}"
alt="{{.Site.Author.name}}" id="author-img">
src="{{ with $.Site.Params.Author.image }}{{ . | absURL }}{{ else }}https://picsum.photos/120.webp{{ end }}"
alt="{{.Site.Params.Author.name}}" id="author-img">
<div>
<p rel="me" class="p-name" id="author-name">
{{ with .Params.author }}
{{ . }}
{{ else }}
{{ $.Site.Author.name }}
{{ $.Site.Params.Author.name }}
{{ end }}
</p>
<p class="properties">
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<div class="flex item-head">
<div class="flex left">
<img id="author-img"
src="{{ with $.Site.Author.image }}/{{ . }}{{ else }}https://picsum.photos/120.webp{{ end }}">
src="{{ with $.Site.Params.Author.image }}/{{ . }}{{ else }}https://picsum.photos/120.webp{{ end }}">
<div>
<p id="author-name">
{{ with $.Site.Author.name }}{{ . }}{{ else }}Anonymous{{ end }}
{{ with $.Site.Params.Author.name }}{{ . }}{{ else }}Anonymous{{ end }}
{{ $url := urls.Parse .Permalink }}
<a href="{{.Site.BaseURL}}">@{{ $url.Host }}</a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $.Scratch.Add "index" slice -}}
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}}
{{- range $pages -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "author" .Site.Author "site" .Site.BaseURL "title" .Title "date" .Date "content" .Plain "tags" .Params.tags "categories" .Params.tags) -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "author" .Site.Params.Author "site" .Site.BaseURL "title" .Title "date" .Date "content" .Plain "tags" .Params.tags "categories" .Params.tags) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}
14 changes: 7 additions & 7 deletions layouts/partials/h-card.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<!-- representative h-card: https://microformats.org/wiki/h-card -->
<div class="h-card" rel="author" id="author">
<div class="flex row">
<img class="u-photo" id="author-img" alt="{{ with .Site.Author.name }}{{ . }}{{ else }}author photo{{ end }}"
src="{{ with .Site.Author.image }}{{ . | absURL }}{{ else }}https://picsum.photos/120.webp{{ end }}">
<img class="u-photo" id="author-img" alt="{{ with .Site.Params.Author.name }}{{ . }}{{ else }}author photo{{ end }}"
src="{{ with .Site.Params.Author.image }}{{ . | absURL }}{{ else }}https://picsum.photos/120.webp{{ end }}">
<div id="card" class="md">
<h1 class="p-name">{{ with .Site.Author.name }}{{ . }}{{ end }}</h1>
<h1 class="p-name">{{ with .Site.Params.Author.name }}{{ . }}{{ end }}</h1>
<address class="properties">
{{ $url := urls.Parse .Permalink }}
<a class="u-url u-uid" href="{{ with .Site.Author.domain }}{{.}}">{{ $.Site.Author.domain }}</a>
<a class="u-url u-uid" href="{{ with .Site.Params.Author.domain }}{{.}}">{{ $.Site.Params.Author.domain }}</a>
{{ else }}{{ $.Permalink }}">{{ $url.Host }}</a>{{ end }}
{{ with .Site.Author.nickname }} {{ $.Site.Params.separator | default "∙" }}
{{ with .Site.Params.Author.nickname }} {{ $.Site.Params.separator | default "∙" }}
<span class="p-nickname">{{.}}</span>
{{ end }}
{{ with .Site.Author.email }} {{ $.Site.Params.separator | default "∙" }}
{{ with .Site.Params.Author.email }} {{ $.Site.Params.separator | default "∙" }}
<a class="u-email" href="mailto:{{ . }}">{{ . }}</a>
{{ end }}
{{ with .Site.Params.githubuser }} {{ $.Site.Params.separator | default "∙" }}
Expand All @@ -25,7 +25,7 @@ <h1 class="p-name">{{ with .Site.Author.name }}{{ . }}{{ end }}</h1>
{{ if (fileExists $bio) -}}
{{ readFile $bio | markdownify }}
{{ else }}
{{ .Site.Author.about }}
{{ .Site.Params.Author.about }}
{{- end }}
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/li.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="feed__content">
<div class="flex properties__row ">
<div class="flex left properties">
<a rel="author" class="p-author h-card hidden" href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>
<a rel="author" class="p-author h-card hidden" href="{{ .Site.BaseURL }}">{{ .Site.Params.Author.name }}</a>
</div>
<div class="flex right properties">
{{ if in .Params.Categories "reply" }}
Expand Down
6 changes: 3 additions & 3 deletions layouts/services/list.atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
<link href="{{ .Permalink }}feed.xml" rel="self"/>
<link href="{{ .Permalink }}"/>{{ if not .Date.IsZero }}
<updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>{{ end }}
<id>{{ .Permalink }}</id>{{ with .Site.Author.name }}
<id>{{ .Permalink }}</id>{{ with .Site.Params.Author.name }}
<author>
<name>{{.}}</name>{{ with $.Site.Author.email }}
<name>{{.}}</name>{{ with $.Site.Params.Author.email }}
<email>{{.}}</email>{{end}}
</author>{{end}}
<generator>Hugo -- gohugo.io</generator>{{ range $pages }}
<entry>
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
<link href="{{ .Permalink }}"/>
<id>{{ .Permalink }}</id>{{ with $.Site.Author.name }}
<id>{{ .Permalink }}</id>{{ with $.Site.Params.Author.name }}
<author>
<name>{{.}}</name>
</author>{{end}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/services/list.json.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $.Scratch.Add "index" slice -}}
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}}
{{- range $pages -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "author" .Site.Author "site" .Site.BaseURL "title" .Title "date" .Date "content" .Plain "tags" .Params.tags "categories" .Params.tags) -}}
{{- $.Scratch.Add "index" (dict "uri" .Permalink "author" .Site.Params.Author "site" .Site.BaseURL "title" .Title "date" .Date "content" .Plain "tags" .Params.tags "categories" .Params.tags) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}
8 changes: 4 additions & 4 deletions layouts/services/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<link>{{ .Permalink }}</link>
<description>Read the latest {{ if ne .Title .Site.Title }}{{ with .Title }} {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ 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.Copyright }}
<language>{{.}}</language>{{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" -}}
Expand All @@ -30,7 +30,7 @@
<title>{{ .Title }}</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>
<content:encoded>
Expand Down

0 comments on commit 7e9df74

Please sign in to comment.