Page MenuHomePhorge

PaperMod theme compatibility fixs for Hugo 0.146.0+

Authored By
nawan
Feb 10 2026, 23:34
Size
6 KB
Referenced Files
None
Subscribers
None

PaperMod theme compatibility fixs for Hugo 0.146.0+

From abe66c82bebee9dae5fb91df429a16f1fd5c363c Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Mon, 14 Apr 2025 17:46:51 -0700
Subject: [PATCH 1/2] Make things work in 0.146+
---
layouts/partials/head.html | 8 ++++----
layouts/partials/templates/schema_json.html | 2 +-
layouts/partials/templates/twitter_cards.html | 2 +-
theme.toml | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 3e55c67007..ae6450abe1 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -150,8 +150,8 @@
{{- /* Misc */}}
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
-{{- template "_internal/google_analytics.html" . }}
-{{- template "partials/templates/opengraph.html" . }}
-{{- template "partials/templates/twitter_cards.html" . }}
-{{- template "partials/templates/schema_json.html" . }}
+{{- partial "google_analytics.html" . }}
+{{- partial "templates/opengraph.html" . }}
+{{- partial "templates/twitter_cards.html" . }}
+{{- partial "templates/schema_json.html" . }}
{{- end -}}
diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html
index dc3bfd6a0d..8a4efb41c9 100644
--- a/layouts/partials/templates/schema_json.html
+++ b/layouts/partials/templates/schema_json.html
@@ -85,7 +85,7 @@
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
{{- end}}
{{- else }}
- {{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
+ {{- $images := partial "templates/_funcs/get-page-images" . -}}
{{- with index $images 0 -}}
"image": {{ .Permalink }},
{{- end }}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index 6b0d59bd1d..a6e1d05dd0 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -6,7 +6,7 @@
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}">
{{- end}}
{{- else }}
-{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
+{{- $images := partial "templates/_funcs/get-page-images" . -}}
{{- with index $images 0 -}}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ .Permalink }}">
diff --git a/theme.toml b/theme.toml
index 391b248545..e4352b960b 100644
--- a/theme.toml
+++ b/theme.toml
@@ -38,7 +38,7 @@ features = [
"scroll-to-top",
"search"
]
-min_version = "0.125.7"
+min_version = "0.146.0"
[author]
name = "Aditya Telange"
From 32f2e0e3d19ac7e0d990dd09f11a9d2302121d43 Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Mon, 14 Apr 2025 17:48:55 -0700
Subject: [PATCH 2/2] Versioning
---
.github/ISSUE_TEMPLATE/bug.yaml | 4 ++--
.github/workflows/gh-pages.yml | 4 ++--
README.md | 2 +-
layouts/_default/baseof.html | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml
index 0cee3ee9d0..d7d7656786 100644
--- a/.github/ISSUE_TEMPLATE/bug.yaml
+++ b/.github/ISSUE_TEMPLATE/bug.yaml
@@ -39,8 +39,8 @@ body:
label: Hugo Version
description: What version of Hugo are you running?
options:
- - Hugo >= 0.125.7 (Recommended - Minimum version required for PaperMod)
- - Hugo < 0.125.7 (Incompatible - Not recommended to build PaperMod on lower versions)
+ - Hugo >= 0.146.0 (Recommended - Minimum version required for PaperMod)
+ - Hugo < 0.146.0 (Incompatible - Not recommended to build PaperMod on lower versions)
validations:
required: true
- type: input
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 92b859f58f..7dc6f1c392 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -15,7 +15,7 @@ on:
hugoVersion:
description: "Hugo Version"
required: false
- default: "0.125.7"
+ default: "0.146.0"
# Allow one concurrent deployment
concurrency:
@@ -38,7 +38,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
- HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.125.7' }}
+ HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }}
steps:
- name: Install Hugo CLI
run: |
diff --git a/README.md b/README.md
index 1c00072808..7b2956e6df 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
**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.
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/)
-[![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)
+[![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)
[![Discord](https://img.shields.io/discord/971046860317921340?label=Discord&logo=discord)](https://discord.gg/ahpmTvhVmp)
[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod)
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 94e7d5857d..db3a50688c 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
-{{- if lt hugo.Version "0.125.7" }}
-{{- errorf "=> hugo v0.125.7 or greater is required for hugo-PaperMod to build " }}
+{{- if lt hugo.Version "0.146.0" }}
+{{- errorf "=> hugo v0.146.0 or greater is required for hugo-PaperMod to build " }}
{{- end -}}
<!DOCTYPE html>

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
502
Default Alt Text
PaperMod theme compatibility fixs for Hugo 0.146.0+ (6 KB)

Event Timeline