Skip to content

Commit 7cf752f

Browse files
authored
Implement fixes for refreshed template system for Hugo v0.146.0+ (#1726)
1 parent 149f12c commit 7cf752f

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

.github/ISSUE_TEMPLATE/bug.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ body:
3939
label: Hugo Version
4040
description: What version of Hugo are you running?
4141
options:
42-
- Hugo >= 0.125.7 (Recommended - Minimum version required for PaperMod)
43-
- Hugo < 0.125.7 (Incompatible - Not recommended to build PaperMod on lower versions)
42+
- Hugo >= 0.146.0 (Recommended - Minimum version required for PaperMod)
43+
- Hugo < 0.146.0 (Incompatible - Not recommended to build PaperMod on lower versions)
4444
validations:
4545
required: true
4646
- type: input

.github/workflows/gh-pages.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
hugoVersion:
1616
description: "Hugo Version"
1717
required: false
18-
default: "0.125.7"
18+
default: "0.146.0"
1919

2020
# Allow one concurrent deployment
2121
concurrency:
@@ -38,7 +38,7 @@ jobs:
3838
build:
3939
runs-on: ubuntu-latest
4040
env:
41-
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.125.7' }}
41+
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }}
4242
steps:
4343
- name: Install Hugo CLI
4444
run: |

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
**ExampleSite** can be found here: [**exampleSite**](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) as source.
1212

1313
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/)
14-
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.125.7&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.125.7)
14+
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.146.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.146.0)
1515
[![Discord](https://img.shields.io/discord/971046860317921340?label=Discord&logo=discord)](https://discord.gg/ahpmTvhVmp)
1616
[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
1717
![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod)

layouts/_default/baseof.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{{- if lt hugo.Version "0.125.7" }}
2-
{{- errorf "=> hugo v0.125.7 or greater is required for hugo-PaperMod to build " }}
1+
{{- if lt hugo.Version "0.146.0" }}
2+
{{- errorf "=> hugo v0.146.0 or greater is required for hugo-PaperMod to build " }}
33
{{- end -}}
44

55
<!DOCTYPE html>

layouts/partials/head.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@
150150

151151
{{- /* Misc */}}
152152
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
153-
{{- template "_internal/google_analytics.html" . }}
154-
{{- template "partials/templates/opengraph.html" . }}
155-
{{- template "partials/templates/twitter_cards.html" . }}
156-
{{- template "partials/templates/schema_json.html" . }}
153+
{{- partial "google_analytics.html" . }}
154+
{{- partial "templates/opengraph.html" . }}
155+
{{- partial "templates/twitter_cards.html" . }}
156+
{{- partial "templates/schema_json.html" . }}
157157
{{- end -}}

layouts/partials/templates/schema_json.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
8686
{{- end}}
8787
{{- else }}
88-
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
88+
{{- $images := partial "templates/_funcs/get-page-images" . -}}
8989
{{- with index $images 0 -}}
9090
"image": {{ .Permalink }},
9191
{{- end }}

layouts/partials/templates/twitter_cards.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}">
77
{{- end}}
88
{{- else }}
9-
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
9+
{{- $images := partial "templates/_funcs/get-page-images" . -}}
1010
{{- with index $images 0 -}}
1111
<meta name="twitter:card" content="summary_large_image">
1212
<meta name="twitter:image" content="{{ .Permalink }}">

theme.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ features = [
3838
"scroll-to-top",
3939
"search"
4040
]
41-
min_version = "0.125.7"
41+
min_version = "0.146.0"
4242

4343
[author]
4444
name = "Aditya Telange"

0 commit comments

Comments
 (0)