{{- .Title }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ee0fec43..837f6197 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -22,7 +22,7 @@ {{- end }}
-
+
+
{{- .Title | markdownify }}
- {{- if .Draft }} [draft]{{- end }}
+ {{- if .Draft }}
+
+
+
+ {{- end }}
{{- partial "post_meta.html" . -}}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 2640f164..81aea6e4 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -67,9 +67,16 @@
{{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }}
{{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }}
-
+
{{- .Title }}
- {{- if .Draft }} [draft]{{- end }}
+ {{- if .Draft }}
+
+
+
+ {{- end }}
{{- if (ne (.Param "hideSummary") true) }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 837f6197..19a624f4 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -3,9 +3,16 @@
{{ partial "breadcrumbs.html" . }}
-
+
{{ .Title }}
- {{- if .Draft }} [draft]{{- end }}
+ {{- if .Draft }}
+
+
+
+ {{- end }}
{{- if .Description }}
From 86362ebd72776c78c1c30e660ceb903d235f493d Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 19:28:05 +0530
Subject: [PATCH 07/20] Update README.md
---
README.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 7a80ccab..14b0bf91 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive
-> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
+> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
> The goal of this project is to add more features and customization to the og theme.
**Documentation** can be found here: [**📚 Wiki**](https://github.com/adityatelange/hugo-PaperMod/wiki)
@@ -11,10 +11,12 @@
**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=HUGO-version&message=>0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1)
+[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1)
[![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)
+[![X (formerly Twitter) URL](https://img.shields.io/badge/-Share%20on%20X-gray?style=flat&logo=x)](https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod)
+
---
From 102e089bc3c1cf30a0f5b204c0182e0ce72b6880 Mon Sep 17 00:00:00 2001
From: Razon Yang
Date: Sat, 4 Nov 2023 15:01:23 +0530
Subject: [PATCH 08/20] [PATCH] tpl/embedded: Make Open Graph's series optional
cherry-picked from
https://github.com/gohugoio/hugo/commit/b82b547acb404cdb883154cc4991137d46caa22a
---
layouts/partials/templates/opengraph.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 9e8df143..631dda14 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -41,12 +41,14 @@
{{- /* If it is part of a series, link to related articles */}}
{{- $permalink := .Permalink }}
{{- $siteSeries := site.Taxonomies.series }}
+{{- if $siteSeries }}
{{ with .Params.series }}{{- range $name := . }}
{{- $series := index $siteSeries ($name | urlize) }}
{{- range $page := first 6 $series.Pages }}
{{- if ne $page.Permalink $permalink }}{{ end }}
{{- end }}
{{ end }}{{ end }}
+{{- end }}
{{- /* Facebook Page Admin ID for Domain Insights */}}
{{- with site.Social.facebook_admin }}{{ end }}
From 3fb112bc851ae88d7457300a262c7a30a7522454 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:05:42 +0530
Subject: [PATCH 09/20] [PATCH] tpl/tplimpl: Deprecate .Site.Social usage with
internal templates cherry-picked from
https://github.com/gohugoio/hugo/commit/4910312ee75a1c67fad68c259ad9576dca854c62
---
layouts/partials/templates/opengraph.html | 13 ++++++++++++-
layouts/partials/templates/twitter_cards.html | 15 +++++++++++++--
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 631dda14..b7fe84c7 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -50,5 +50,16 @@
{{ end }}{{ end }}
{{- end }}
+{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
+{{- $facebookAdmin := "" }}
+{{- with site.Params.social.facebook_admin }}
+ {{- $facebookAdmin = . }}
+{{- else }}
+ {{- with site.Social.facebook_admin }}
+ {{- $facebookAdmin = . }}
+ {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
+ {{- end }}
+{{- end }}
+
{{- /* Facebook Page Admin ID for Domain Insights */}}
-{{- with site.Social.facebook_admin }}{{ end }}
+{{ with $facebookAdmin }}{{ end }}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index bd46e376..bdb59239 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -28,6 +28,17 @@
{{- end }}
-{{ with site.Social.twitter -}}
+{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
+{{- $twitterSite := "" }}
+{{- with site.Params.social.twitter }}
+ {{- $twitterSite = . }}
+{{- else }}
+ {{- with site.Social.twitter }}
+ {{- $twitterSite = . }}
+ {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }}
+ {{- end }}
+{{- end }}
+
+{{- with $twitterSite }}
-{{ end -}}
+{{- end }}
From 87df659c185b91ab09f8eb978b3aab5945b0f8b5 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:08:01 +0530
Subject: [PATCH 10/20] [PATCH] tpl/tplimpl: Fix deprecation logic in embedded
templates cherry-picked from
https://github.com/gohugoio/hugo/commit/cb98e9061b3d62b6f1e635a6cf9a8be57dc3f56c
---
layouts/partials/templates/opengraph.html | 6 ++++--
layouts/partials/templates/twitter_cards.html | 12 +++++++++---
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index b7fe84c7..38fbd246 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -52,8 +52,10 @@
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
{{- $facebookAdmin := "" }}
-{{- with site.Params.social.facebook_admin }}
- {{- $facebookAdmin = . }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $facebookAdmin = .facebook_admin }}
+ {{- end }}
{{- else }}
{{- with site.Social.facebook_admin }}
{{- $facebookAdmin = . }}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index bdb59239..0e7760aa 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -30,8 +30,10 @@
{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
{{- $twitterSite := "" }}
-{{- with site.Params.social.twitter }}
- {{- $twitterSite = . }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $twitterSite = .twitter }}
+ {{- end }}
{{- else }}
{{- with site.Social.twitter }}
{{- $twitterSite = . }}
@@ -40,5 +42,9 @@
{{- end }}
{{- with $twitterSite }}
-
+ {{- $content := . }}
+ {{- if not (strings.HasPrefix . "@") }}
+ {{- $content = printf "@%v" $twitterSite }}
+ {{- end }}
+
{{- end }}
From cf62fa3c40ea9a2527b5081db699e28c0e391985 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:19:28 +0530
Subject: [PATCH 11/20] [PATCH] tpl/tplimpl: Use .Language.LanguageCode in
built-in templates cherry-pick from
https://github.com/gohugoio/hugo/commit/ff77a927f9c032f5a65eff2daf1f7f8c04103711
---
layouts/_default/rss.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 44f14986..db57edac 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -23,8 +23,8 @@
{{ index . 0 | absURL }}
{{- end }}
- Hugo -- gohugo.io {{ with site.LanguageCode }}
- {{.}} {{end}}{{ with site.Author.email }}
+ Hugo -- gohugo.io
+ {{ site.Language.LanguageCode }} {{ with site.Author.email }}
{{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Author.email }}
{{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Copyright }}
{{.}} {{end}}{{ if not .Date.IsZero }}
From 00488d01463fc8c8db9fbda3f6060a0b5b373464 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:23:31 +0530
Subject: [PATCH 12/20] [PATCH] tpl/tplimpl: Deprecate .Site.Author usage in
RSS template cherry-pick from
https://github.com/gohugoio/hugo/commit/d4016dd5cd57a27f19a5472c6031d156066860b7
---
layouts/_default/rss.xml | 68 ++++++++++++++++++++++++++--------------
1 file changed, 45 insertions(+), 23 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index db57edac..22b2e6ed 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -1,21 +1,43 @@
-{{- $pctx := . -}}
-{{- if .IsHome -}}{{ $pctx = site }}{{- end -}}
-{{- $pages := slice -}}
-{{- if or $.IsHome $.IsSection -}}
-{{- $pages = $pctx.RegularPages -}}
-{{- else -}}
-{{- $pages = $pctx.Pages -}}
-{{- end -}}
-{{- $limit := site.Config.Services.RSS.Limit -}}
-{{- if ge $limit 1 -}}
-{{- $pages = $pages | first $limit -}}
-{{- end -}}
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author.email }}
+ {{- $authorEmail = . }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author.name }}
+ {{- $authorName = . }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- $pctx := . }}
+{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
+{{- $pages := slice }}
+{{- if or $.IsHome $.IsSection }}
+{{- $pages = $pctx.RegularPages }}
+{{- else }}
+{{- $pages = $pctx.Pages }}
+{{- end }}
+{{- $limit := .Site.Config.Services.RSS.Limit }}
+{{- if ge $limit 1 }}
+{{- $pages = $pages | first $limit }}
+{{- end }}
{{- printf "" | safeHTML }}
-
+
- {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}
+ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}
{{ .Permalink }}
- Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }}
+ Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}
{{- with site.Params.images }}
{{ site.Title }}
@@ -24,21 +46,21 @@
{{- end }}
Hugo -- gohugo.io
- {{ site.Language.LanguageCode }} {{ with site.Author.email }}
- {{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Author.email }}
- {{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Copyright }}
- {{.}} {{end}}{{ if not .Date.IsZero }}
+ {{ site.Language.LanguageCode }} {{ with $authorEmail }}
+ {{.}}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with $authorEmail }}
+ {{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with .Site.Copyright }}
+ {{ . }} {{ end }}{{ if not .Date.IsZero }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }}
- {{- with .OutputFormats.Get "RSS" -}}
+ {{- with .OutputFormats.Get "RSS" }}
{{ printf " " .Permalink .MediaType | safeHTML }}
- {{- end -}}
- {{ range $pages }}
+ {{- end }}
+ {{- range $pages }}
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
-
{{ .Title }}
{{ .Permalink }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
- {{ with site.Author.email }}{{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}
+ {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}
{{ .Permalink }}
{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}
{{- if site.Params.ShowFullTextinRSS }}
From ff7443b17f597e2307a590c805e39df1d935ebc6 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:34:56 +0530
Subject: [PATCH 13/20] [PATCH] tpl/tplimpl: Fix deprecation logic in RSS
template cherry-pick from
https://github.com/gohugoio/hugo/commit/23fcfb7f741a417f53a8ef4997bb68e64631df01
---
layouts/_default/rss.xml | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 22b2e6ed..3b28fbf6 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -1,7 +1,11 @@
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
{{- $authorEmail := "" }}
-{{- with site.Params.author.email }}
- {{- $authorEmail = . }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
{{- else }}
{{- with site.Author.email }}
{{- $authorEmail = . }}
@@ -11,8 +15,14 @@
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
{{- $authorName := "" }}
-{{- with site.Params.author.name }}
- {{- $authorName = . }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
{{- else }}
{{- with site.Author.name }}
{{- $authorName = . }}
From f51ad4981904a9cb0ad9729b6d204532fef4371d Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 4 Nov 2023 15:36:08 +0530
Subject: [PATCH 14/20] replace .Site with site & fix whitespace
---
layouts/_default/rss.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 3b28fbf6..b6a7ec06 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -31,23 +31,23 @@
{{- end }}
{{- $pctx := . }}
-{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
+{{- if .IsHome }}{{ $pctx = site }}{{ end }}
{{- $pages := slice }}
{{- if or $.IsHome $.IsSection }}
{{- $pages = $pctx.RegularPages }}
{{- else }}
{{- $pages = $pctx.Pages }}
{{- end }}
-{{- $limit := .Site.Config.Services.RSS.Limit }}
+{{- $limit := site.Config.Services.RSS.Limit }}
{{- if ge $limit 1 }}
{{- $pages = $pages | first $limit }}
{{- end }}
{{- printf "" | safeHTML }}
- {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}
+ {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}
{{ .Permalink }}
- Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}
+ Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}
{{- with site.Params.images }}
{{ site.Title }}
@@ -58,7 +58,7 @@
Hugo -- gohugo.io
{{ site.Language.LanguageCode }} {{ with $authorEmail }}
{{.}}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with $authorEmail }}
- {{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with .Site.Copyright }}
+ {{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with site.Copyright }}
{{ . }} {{ end }}{{ if not .Date.IsZero }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }}
{{- with .OutputFormats.Get "RSS" }}
@@ -78,6 +78,6 @@
{{- end }}
{{- end }}
- {{ end }}
+ {{- end }}
From e3ad0aeb705409639a4a4d860075a2924e00eb23 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 19:59:55 +0530
Subject: [PATCH 15/20] Bump minimum Hugo version to 0.112.4
* language.LanguageCode is required for Fix/hugo depr 0.120.x #1328
---
.github/ISSUE_TEMPLATE/bug_report.md | 2 +-
.github/workflows/gh-pages.yml | 4 ++--
README.md | 2 +-
layouts/_default/baseof.html | 4 ++--
theme.toml | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index b7d5b289..d88b750f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -26,7 +26,7 @@ Please fill the template below
- Device/Os: [e.g. Android 10]
- Type: [e.g. Desktop/Mobile]
- Browser and version [e.g. Chrome 86.0]:
- - Hugo Version [ >=0.97.1 expected]:
+ - Hugo Version [ >=0.112.4 expected]:
- Theme Version [e.g. v4.0, master, or commit-id ]:
**Steps to reproduce the behavior:**
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index c7b8351a..f4acb7e0 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.97.1"
+ default: "0.112.4"
# Allow one concurrent deployment
concurrency:
@@ -38,7 +38,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
- HUGO_VERSION: "0.97.1"
+ HUGO_VERSION: "0.112.4"
steps:
- name: Check version
if: ${{ github.event.inputs.hugoVersion }}
diff --git a/README.md b/README.md
index 14b0bf91..12bd8cb6 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=>=0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1)
+[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.112.4&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.112.4)
[![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 d2de5eec..df611bfb 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
-{{- if lt hugo.Version "0.97.1" }}
-{{- errorf "=> hugo v0.97.1 or greater is required for hugo-PaperMod to build " }}
+{{- if lt hugo.Version "0.112.4" }}
+{{- errorf "=> hugo v0.112.4 or greater is required for hugo-PaperMod to build " }}
{{- end -}}
diff --git a/theme.toml b/theme.toml
index aa26fe06..f659f5c9 100644
--- a/theme.toml
+++ b/theme.toml
@@ -37,7 +37,7 @@ features = [
"scroll-to-top",
"search"
]
-min_version = "0.97.1"
+min_version = "0.112.4"
[author]
name = "Aditya Telange"
From 5f624757ae894d46c2e96e6ba6c0720a4ec7771a Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 20:07:15 +0530
Subject: [PATCH 16/20] Workflows: Update release bin path for hugo
linux-amd64.deb
---
.github/workflows/gh-pages.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index f4acb7e0..4d35f1de 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -45,7 +45,7 @@ jobs:
run: export HUGO_VERSION="${{ github.event.inputs.hugoVersion }}"
- name: Install Hugo CLI
run: |
- wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb \
+ wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v3
From f8e125c7eef82323b11fc2dfc67110dfc7454dd8 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 20:59:08 +0530
Subject: [PATCH 17/20] Add padding to social-icons for better tap sizing
---
assets/css/common/main.css | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/assets/css/common/main.css b/assets/css/common/main.css
index 50022ac1..25ae4dae 100644
--- a/assets/css/common/main.css
+++ b/assets/css/common/main.css
@@ -27,12 +27,10 @@
margin-inline-start: auto;
}
-.social-icons {
- padding: 12px 0;
-}
-.social-icons a:not(:last-of-type) {
- margin-inline-end: 12px;
+.social-icons a {
+ display: inline-flex;
+ padding: 10px;
}
.social-icons a svg {
From 69e5e085ab0b8d0cae03d9c189c4b262890646ac Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 20:59:36 +0530
Subject: [PATCH 18/20] improved profile mode spacing
---
assets/css/common/profile-mode.css | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/assets/css/common/profile-mode.css b/assets/css/common/profile-mode.css
index 58f28198..9e98df55 100644
--- a/assets/css/common/profile-mode.css
+++ b/assets/css/common/profile-mode.css
@@ -10,19 +10,20 @@
text-align: center;
}
-.profile .profile_inner h1 {
- padding: 12px 0;
+.profile .profile_inner {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 10px;
}
.profile img {
- display: inline-table;
border-radius: 50%;
}
.buttons {
flex-wrap: wrap;
max-width: 400px;
- margin: 0 auto;
}
.button {
From fb1c0aeb6fd5b1b1cfc17a977754cc6d0f03b486 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 21:38:24 +0530
Subject: [PATCH 19/20] social icons refactor Params.socialIcons
---
layouts/partials/home_info.html | 2 +-
layouts/partials/index_profile.html | 2 +-
layouts/partials/social_icons.html | 5 +++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html
index efae956e..aece5327 100644
--- a/layouts/partials/home_info.html
+++ b/layouts/partials/home_info.html
@@ -7,7 +7,7 @@
{{ .Content | markdownify }}
{{- end -}}
diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html
index d9ddbda5..6882f39b 100644
--- a/layouts/partials/index_profile.html
+++ b/layouts/partials/index_profile.html
@@ -32,7 +32,7 @@
{{- end }}
{{ .title | default site.Title | markdownify }}
{{ .subtitle | markdownify }}
- {{- partial "social_icons.html" site.Params.socialIcons -}}
+ {{- partial "social_icons.html" -}}
{{- with .buttons }}
diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html
index 876b77c6..761129eb 100644
--- a/layouts/partials/social_icons.html
+++ b/layouts/partials/social_icons.html
@@ -1,6 +1,7 @@
- {{- range . }}
-
+ {{- range site.Params.socialIcons }}
+
{{ partial "svg.html" . }}
{{- end }}
From 0989c28a0ecdf674906a18d663a4f806b49ec03f Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 21:40:14 +0530
Subject: [PATCH 20/20] Allow aligning social-icons in homeInfo mode
In Site config
homeInfoParams:
AlignSocialIconsTo: "center" # or left or right
---
layouts/partials/home_info.html | 2 +-
layouts/partials/social_icons.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html
index aece5327..199dfb72 100644
--- a/layouts/partials/home_info.html
+++ b/layouts/partials/home_info.html
@@ -7,7 +7,7 @@
{{ .Content | markdownify }}
{{- end -}}
diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html
index 761129eb..ce76a308 100644
--- a/layouts/partials/social_icons.html
+++ b/layouts/partials/social_icons.html
@@ -1,4 +1,4 @@
-
+
{{- .Title }}
- {{- if .Draft }} [draft]{{- end }}
+ {{- if .Draft }}
+
+
+
+ {{- end }}
+
{{ .Title }}
- {{- if .Draft }} [draft]{{- end }}
+ {{- if .Draft }}
+
+
+
+ {{- end }}
{{- if .Description }}
From 86362ebd72776c78c1c30e660ceb903d235f493d Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 19:28:05 +0530
Subject: [PATCH 07/20] Update README.md
---
README.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 7a80ccab..14b0bf91 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive
-> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
+> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
> The goal of this project is to add more features and customization to the og theme.
**Documentation** can be found here: [**📚 Wiki**](https://github.com/adityatelange/hugo-PaperMod/wiki)
@@ -11,10 +11,12 @@
**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=HUGO-version&message=>0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1)
+[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1)
[![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)
+[![X (formerly Twitter) URL](https://img.shields.io/badge/-Share%20on%20X-gray?style=flat&logo=x)](https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod)
+
---
From 102e089bc3c1cf30a0f5b204c0182e0ce72b6880 Mon Sep 17 00:00:00 2001
From: Razon Yang
Date: Sat, 4 Nov 2023 15:01:23 +0530
Subject: [PATCH 08/20] [PATCH] tpl/embedded: Make Open Graph's series optional
cherry-picked from
https://github.com/gohugoio/hugo/commit/b82b547acb404cdb883154cc4991137d46caa22a
---
layouts/partials/templates/opengraph.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 9e8df143..631dda14 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -41,12 +41,14 @@
{{- /* If it is part of a series, link to related articles */}}
{{- $permalink := .Permalink }}
{{- $siteSeries := site.Taxonomies.series }}
+{{- if $siteSeries }}
{{ with .Params.series }}{{- range $name := . }}
{{- $series := index $siteSeries ($name | urlize) }}
{{- range $page := first 6 $series.Pages }}
{{- if ne $page.Permalink $permalink }}{{ end }}
{{- end }}
{{ end }}{{ end }}
+{{- end }}
{{- /* Facebook Page Admin ID for Domain Insights */}}
{{- with site.Social.facebook_admin }}{{ end }}
From 3fb112bc851ae88d7457300a262c7a30a7522454 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:05:42 +0530
Subject: [PATCH 09/20] [PATCH] tpl/tplimpl: Deprecate .Site.Social usage with
internal templates cherry-picked from
https://github.com/gohugoio/hugo/commit/4910312ee75a1c67fad68c259ad9576dca854c62
---
layouts/partials/templates/opengraph.html | 13 ++++++++++++-
layouts/partials/templates/twitter_cards.html | 15 +++++++++++++--
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 631dda14..b7fe84c7 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -50,5 +50,16 @@
{{ end }}{{ end }}
{{- end }}
+{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
+{{- $facebookAdmin := "" }}
+{{- with site.Params.social.facebook_admin }}
+ {{- $facebookAdmin = . }}
+{{- else }}
+ {{- with site.Social.facebook_admin }}
+ {{- $facebookAdmin = . }}
+ {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
+ {{- end }}
+{{- end }}
+
{{- /* Facebook Page Admin ID for Domain Insights */}}
-{{- with site.Social.facebook_admin }}{{ end }}
+{{ with $facebookAdmin }}{{ end }}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index bd46e376..bdb59239 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -28,6 +28,17 @@
{{- end }}
-{{ with site.Social.twitter -}}
+{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
+{{- $twitterSite := "" }}
+{{- with site.Params.social.twitter }}
+ {{- $twitterSite = . }}
+{{- else }}
+ {{- with site.Social.twitter }}
+ {{- $twitterSite = . }}
+ {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }}
+ {{- end }}
+{{- end }}
+
+{{- with $twitterSite }}
-{{ end -}}
+{{- end }}
From 87df659c185b91ab09f8eb978b3aab5945b0f8b5 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:08:01 +0530
Subject: [PATCH 10/20] [PATCH] tpl/tplimpl: Fix deprecation logic in embedded
templates cherry-picked from
https://github.com/gohugoio/hugo/commit/cb98e9061b3d62b6f1e635a6cf9a8be57dc3f56c
---
layouts/partials/templates/opengraph.html | 6 ++++--
layouts/partials/templates/twitter_cards.html | 12 +++++++++---
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index b7fe84c7..38fbd246 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -52,8 +52,10 @@
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
{{- $facebookAdmin := "" }}
-{{- with site.Params.social.facebook_admin }}
- {{- $facebookAdmin = . }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $facebookAdmin = .facebook_admin }}
+ {{- end }}
{{- else }}
{{- with site.Social.facebook_admin }}
{{- $facebookAdmin = . }}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index bdb59239..0e7760aa 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -30,8 +30,10 @@
{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
{{- $twitterSite := "" }}
-{{- with site.Params.social.twitter }}
- {{- $twitterSite = . }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $twitterSite = .twitter }}
+ {{- end }}
{{- else }}
{{- with site.Social.twitter }}
{{- $twitterSite = . }}
@@ -40,5 +42,9 @@
{{- end }}
{{- with $twitterSite }}
-
+ {{- $content := . }}
+ {{- if not (strings.HasPrefix . "@") }}
+ {{- $content = printf "@%v" $twitterSite }}
+ {{- end }}
+
{{- end }}
From cf62fa3c40ea9a2527b5081db699e28c0e391985 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:19:28 +0530
Subject: [PATCH 11/20] [PATCH] tpl/tplimpl: Use .Language.LanguageCode in
built-in templates cherry-pick from
https://github.com/gohugoio/hugo/commit/ff77a927f9c032f5a65eff2daf1f7f8c04103711
---
layouts/_default/rss.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 44f14986..db57edac 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -23,8 +23,8 @@
{{ index . 0 | absURL }}
{{- end }}
- Hugo -- gohugo.io {{ with site.LanguageCode }}
- {{.}} {{end}}{{ with site.Author.email }}
+ Hugo -- gohugo.io
+ {{ site.Language.LanguageCode }} {{ with site.Author.email }}
{{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Author.email }}
{{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Copyright }}
{{.}} {{end}}{{ if not .Date.IsZero }}
From 00488d01463fc8c8db9fbda3f6060a0b5b373464 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:23:31 +0530
Subject: [PATCH 12/20] [PATCH] tpl/tplimpl: Deprecate .Site.Author usage in
RSS template cherry-pick from
https://github.com/gohugoio/hugo/commit/d4016dd5cd57a27f19a5472c6031d156066860b7
---
layouts/_default/rss.xml | 68 ++++++++++++++++++++++++++--------------
1 file changed, 45 insertions(+), 23 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index db57edac..22b2e6ed 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -1,21 +1,43 @@
-{{- $pctx := . -}}
-{{- if .IsHome -}}{{ $pctx = site }}{{- end -}}
-{{- $pages := slice -}}
-{{- if or $.IsHome $.IsSection -}}
-{{- $pages = $pctx.RegularPages -}}
-{{- else -}}
-{{- $pages = $pctx.Pages -}}
-{{- end -}}
-{{- $limit := site.Config.Services.RSS.Limit -}}
-{{- if ge $limit 1 -}}
-{{- $pages = $pages | first $limit -}}
-{{- end -}}
+{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
+{{- $authorEmail := "" }}
+{{- with site.Params.author.email }}
+ {{- $authorEmail = . }}
+{{- else }}
+ {{- with site.Author.email }}
+ {{- $authorEmail = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
+ {{- end }}
+{{- end }}
+
+{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
+{{- $authorName := "" }}
+{{- with site.Params.author.name }}
+ {{- $authorName = . }}
+{{- else }}
+ {{- with site.Author.name }}
+ {{- $authorName = . }}
+ {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
+ {{- end }}
+{{- end }}
+
+{{- $pctx := . }}
+{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
+{{- $pages := slice }}
+{{- if or $.IsHome $.IsSection }}
+{{- $pages = $pctx.RegularPages }}
+{{- else }}
+{{- $pages = $pctx.Pages }}
+{{- end }}
+{{- $limit := .Site.Config.Services.RSS.Limit }}
+{{- if ge $limit 1 }}
+{{- $pages = $pages | first $limit }}
+{{- end }}
{{- printf "" | safeHTML }}
-
+
- {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}
+ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}
{{ .Permalink }}
- Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }}
+ Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}
{{- with site.Params.images }}
{{ site.Title }}
@@ -24,21 +46,21 @@
{{- end }}
Hugo -- gohugo.io
- {{ site.Language.LanguageCode }} {{ with site.Author.email }}
- {{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Author.email }}
- {{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Copyright }}
- {{.}} {{end}}{{ if not .Date.IsZero }}
+ {{ site.Language.LanguageCode }} {{ with $authorEmail }}
+ {{.}}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with $authorEmail }}
+ {{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with .Site.Copyright }}
+ {{ . }} {{ end }}{{ if not .Date.IsZero }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }}
- {{- with .OutputFormats.Get "RSS" -}}
+ {{- with .OutputFormats.Get "RSS" }}
{{ printf " " .Permalink .MediaType | safeHTML }}
- {{- end -}}
- {{ range $pages }}
+ {{- end }}
+ {{- range $pages }}
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
-
{{ .Title }}
{{ .Permalink }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
- {{ with site.Author.email }}{{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}
+ {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}
{{ .Permalink }}
{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}
{{- if site.Params.ShowFullTextinRSS }}
From ff7443b17f597e2307a590c805e39df1d935ebc6 Mon Sep 17 00:00:00 2001
From: Joe Mooring
Date: Sat, 4 Nov 2023 15:34:56 +0530
Subject: [PATCH 13/20] [PATCH] tpl/tplimpl: Fix deprecation logic in RSS
template cherry-pick from
https://github.com/gohugoio/hugo/commit/23fcfb7f741a417f53a8ef4997bb68e64631df01
---
layouts/_default/rss.xml | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 22b2e6ed..3b28fbf6 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -1,7 +1,11 @@
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
{{- $authorEmail := "" }}
-{{- with site.Params.author.email }}
- {{- $authorEmail = . }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .email }}
+ {{- $authorEmail = . }}
+ {{- end }}
+ {{- end }}
{{- else }}
{{- with site.Author.email }}
{{- $authorEmail = . }}
@@ -11,8 +15,14 @@
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
{{- $authorName := "" }}
-{{- with site.Params.author.name }}
- {{- $authorName = . }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
{{- else }}
{{- with site.Author.name }}
{{- $authorName = . }}
From f51ad4981904a9cb0ad9729b6d204532fef4371d Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 4 Nov 2023 15:36:08 +0530
Subject: [PATCH 14/20] replace .Site with site & fix whitespace
---
layouts/_default/rss.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 3b28fbf6..b6a7ec06 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -31,23 +31,23 @@
{{- end }}
{{- $pctx := . }}
-{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
+{{- if .IsHome }}{{ $pctx = site }}{{ end }}
{{- $pages := slice }}
{{- if or $.IsHome $.IsSection }}
{{- $pages = $pctx.RegularPages }}
{{- else }}
{{- $pages = $pctx.Pages }}
{{- end }}
-{{- $limit := .Site.Config.Services.RSS.Limit }}
+{{- $limit := site.Config.Services.RSS.Limit }}
{{- if ge $limit 1 }}
{{- $pages = $pages | first $limit }}
{{- end }}
{{- printf "" | safeHTML }}
- {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}
+ {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}
{{ .Permalink }}
- Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}
+ Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}
{{- with site.Params.images }}
{{ site.Title }}
@@ -58,7 +58,7 @@
Hugo -- gohugo.io
{{ site.Language.LanguageCode }} {{ with $authorEmail }}
{{.}}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with $authorEmail }}
- {{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with .Site.Copyright }}
+ {{ . }}{{ with $authorName }} ({{ . }}){{ end }} {{ end }}{{ with site.Copyright }}
{{ . }} {{ end }}{{ if not .Date.IsZero }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }}
{{- with .OutputFormats.Get "RSS" }}
@@ -78,6 +78,6 @@
{{- end }}
{{- end }}
- {{ end }}
+ {{- end }}
From e3ad0aeb705409639a4a4d860075a2924e00eb23 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 19:59:55 +0530
Subject: [PATCH 15/20] Bump minimum Hugo version to 0.112.4
* language.LanguageCode is required for Fix/hugo depr 0.120.x #1328
---
.github/ISSUE_TEMPLATE/bug_report.md | 2 +-
.github/workflows/gh-pages.yml | 4 ++--
README.md | 2 +-
layouts/_default/baseof.html | 4 ++--
theme.toml | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index b7d5b289..d88b750f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -26,7 +26,7 @@ Please fill the template below
- Device/Os: [e.g. Android 10]
- Type: [e.g. Desktop/Mobile]
- Browser and version [e.g. Chrome 86.0]:
- - Hugo Version [ >=0.97.1 expected]:
+ - Hugo Version [ >=0.112.4 expected]:
- Theme Version [e.g. v4.0, master, or commit-id ]:
**Steps to reproduce the behavior:**
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index c7b8351a..f4acb7e0 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.97.1"
+ default: "0.112.4"
# Allow one concurrent deployment
concurrency:
@@ -38,7 +38,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
- HUGO_VERSION: "0.97.1"
+ HUGO_VERSION: "0.112.4"
steps:
- name: Check version
if: ${{ github.event.inputs.hugoVersion }}
diff --git a/README.md b/README.md
index 14b0bf91..12bd8cb6 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=>=0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1)
+[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.112.4&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.112.4)
[![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 d2de5eec..df611bfb 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
-{{- if lt hugo.Version "0.97.1" }}
-{{- errorf "=> hugo v0.97.1 or greater is required for hugo-PaperMod to build " }}
+{{- if lt hugo.Version "0.112.4" }}
+{{- errorf "=> hugo v0.112.4 or greater is required for hugo-PaperMod to build " }}
{{- end -}}
diff --git a/theme.toml b/theme.toml
index aa26fe06..f659f5c9 100644
--- a/theme.toml
+++ b/theme.toml
@@ -37,7 +37,7 @@ features = [
"scroll-to-top",
"search"
]
-min_version = "0.97.1"
+min_version = "0.112.4"
[author]
name = "Aditya Telange"
From 5f624757ae894d46c2e96e6ba6c0720a4ec7771a Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 20:07:15 +0530
Subject: [PATCH 16/20] Workflows: Update release bin path for hugo
linux-amd64.deb
---
.github/workflows/gh-pages.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index f4acb7e0..4d35f1de 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -45,7 +45,7 @@ jobs:
run: export HUGO_VERSION="${{ github.event.inputs.hugoVersion }}"
- name: Install Hugo CLI
run: |
- wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb \
+ wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v3
From f8e125c7eef82323b11fc2dfc67110dfc7454dd8 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 20:59:08 +0530
Subject: [PATCH 17/20] Add padding to social-icons for better tap sizing
---
assets/css/common/main.css | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/assets/css/common/main.css b/assets/css/common/main.css
index 50022ac1..25ae4dae 100644
--- a/assets/css/common/main.css
+++ b/assets/css/common/main.css
@@ -27,12 +27,10 @@
margin-inline-start: auto;
}
-.social-icons {
- padding: 12px 0;
-}
-.social-icons a:not(:last-of-type) {
- margin-inline-end: 12px;
+.social-icons a {
+ display: inline-flex;
+ padding: 10px;
}
.social-icons a svg {
From 69e5e085ab0b8d0cae03d9c189c4b262890646ac Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 20:59:36 +0530
Subject: [PATCH 18/20] improved profile mode spacing
---
assets/css/common/profile-mode.css | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/assets/css/common/profile-mode.css b/assets/css/common/profile-mode.css
index 58f28198..9e98df55 100644
--- a/assets/css/common/profile-mode.css
+++ b/assets/css/common/profile-mode.css
@@ -10,19 +10,20 @@
text-align: center;
}
-.profile .profile_inner h1 {
- padding: 12px 0;
+.profile .profile_inner {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 10px;
}
.profile img {
- display: inline-table;
border-radius: 50%;
}
.buttons {
flex-wrap: wrap;
max-width: 400px;
- margin: 0 auto;
}
.button {
From fb1c0aeb6fd5b1b1cfc17a977754cc6d0f03b486 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 21:38:24 +0530
Subject: [PATCH 19/20] social icons refactor Params.socialIcons
---
layouts/partials/home_info.html | 2 +-
layouts/partials/index_profile.html | 2 +-
layouts/partials/social_icons.html | 5 +++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html
index efae956e..aece5327 100644
--- a/layouts/partials/home_info.html
+++ b/layouts/partials/home_info.html
@@ -7,7 +7,7 @@
{{ .Content | markdownify }}
☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive
-> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3). +> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
> The goal of this project is to add more features and customization to the og theme. **Documentation** can be found here: [**📚 Wiki**](https://github.com/adityatelange/hugo-PaperMod/wiki) @@ -11,10 +11,12 @@ **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=HUGO-version&message=>0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1) +[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1) [![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) +[![X (formerly Twitter) URL](https://img.shields.io/badge/-Share%20on%20X-gray?style=flat&logo=x)](https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod) + --- From 102e089bc3c1cf30a0f5b204c0182e0ce72b6880 Mon Sep 17 00:00:00 2001 From: Razon Yang
{{ .title | default site.Title | markdownify }}
{{ .subtitle | markdownify }} - {{- partial "social_icons.html" site.Params.socialIcons -}} + {{- partial "social_icons.html" -}} {{- with .buttons }}
diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html
index 876b77c6..761129eb 100644
--- a/layouts/partials/social_icons.html
+++ b/layouts/partials/social_icons.html
@@ -1,6 +1,7 @@
- {{- range . }}
-
+ {{- range site.Params.socialIcons }}
+
{{ partial "svg.html" . }}
{{- end }}
From 0989c28a0ecdf674906a18d663a4f806b49ec03f Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sat, 16 Dec 2023 21:40:14 +0530
Subject: [PATCH 20/20] Allow aligning social-icons in homeInfo mode
In Site config
homeInfoParams:
AlignSocialIconsTo: "center" # or left or right
---
layouts/partials/home_info.html | 2 +-
layouts/partials/social_icons.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html
index aece5327..199dfb72 100644
--- a/layouts/partials/home_info.html
+++ b/layouts/partials/home_info.html
@@ -7,7 +7,7 @@
{{ .Content | markdownify }}
{{- end -}}
diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html
index 761129eb..ce76a308 100644
--- a/layouts/partials/social_icons.html
+++ b/layouts/partials/social_icons.html
@@ -1,4 +1,4 @@
-