Skip to content

Commit 6860656

Browse files
committed
chore: upgrade Hugo from 0.111.3 to 0.152.2
- Updated Hugo version to 0.152.2 across all Netlify deployment contexts - Replaced deprecated .Site.RSSLink with .OutputFormats.Get "RSS" - Updated pagination config from paginate to pagination.pagerSize - Fixed deprecated config parameters for Hugo v0.128+ compatibility - Maintained all existing functionality and design - Verified successful build with 69 pages generated
1 parent 0306071 commit 6860656

6 files changed

Lines changed: 16 additions & 11 deletions

File tree

config.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ theme = "cactus-plus"
1010
hasCJKLanguage = false
1111

1212
# pagination
13-
paginate = 3
13+
[pagination]
14+
pagerSize = 3
1415

1516
[markup]
1617
[markup.goldmark]

layouts/partials/head.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@
102102
{{ end }}
103103

104104
{{ if .Site.Params.enableRSS }}
105-
<link href="{{ .Site.RSSLink }}"
105+
{{ with .OutputFormats.Get "RSS" }}
106+
<link href="{{ .Permalink }}"
106107
rel="alternate"
107108
type="application/rss+xml"
108-
title="{{ .Site.Title }}" />
109+
title="{{ $.Site.Title }}" />
110+
{{ end }}
109111
{{ end }}
110112

111113
<link rel="shortcut icon"

layouts/partials/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
{{ end }}
6161

6262
{{ if .Site.Params.enableRSS }}
63-
<a class="cta" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
63+
{{ with .OutputFormats.Get "RSS" }}<a class="cta" href="{{ .Permalink }}">{{ with $.Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>{{ end }}
6464
</div>
6565
{{ end }}
6666
</nav>

netlify.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,33 @@ command = "hugo --gc --minify"
44

55
[build.environment]
66
GO_VERSION = "1.20.2"
7-
HUGO_VERSION = "0.111.3"
7+
HUGO_VERSION = "0.152.2"
88
HUGO_ENABLEGITINFO = "true"
99
NODE_VERSION = "18.15.0"
1010

1111
[context.production.environment]
12-
HUGO_VERSION = "0.111.3"
12+
HUGO_VERSION = "0.152.2"
1313
HUGO_ENV = "production"
1414
HUGO_ENABLEGITINFO = "true"
1515

1616
[context.split1]
1717
command = "hugo --gc --minify --enableGitInfo"
1818

1919
[context.split1.environment]
20-
HUGO_VERSION = "0.111.3"
20+
HUGO_VERSION = "0.152.2"
2121
HUGO_ENV = "production"
2222

2323
[context.deploy-preview]
2424
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
2525

2626
[context.deploy-preview.environment]
27-
HUGO_VERSION = "0.111.3"
27+
HUGO_VERSION = "0.152.2"
2828

2929
[context.branch-deploy]
3030
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
3131

3232
[context.branch-deploy.environment]
33-
HUGO_VERSION = "0.111.3"
33+
HUGO_VERSION = "0.152.2"
3434

3535
[context.next.environment]
3636
HUGO_ENABLEGITINFO = "true"

themes/cactus-plus/layouts/partials/head.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
{{ end }}
2323

2424
{{ if .Site.Params.enableRSS }}
25-
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
25+
{{ with .OutputFormats.Get "RSS" }}
26+
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
27+
{{ end }}
2628
{{ end }}
2729

2830
{{ range .Site.Params.customCSS }}

themes/cactus-plus/layouts/partials/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
{{ end }}
1313

1414
{{ if .Site.Params.enableRSS }}
15-
<a class="cta" href="{{ .Site.RSSLink }}">{{ with .Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>
15+
{{ with .OutputFormats.Get "RSS" }}<a class="cta" href="{{ .Permalink }}">{{ with $.Site.Params.subscribe }}{{ . }}{{ else }}Subscribe{{ end }}</a>{{ end }}
1616
{{ end }}
1717
</nav>

0 commit comments

Comments
 (0)