Skip to content

Commit

Permalink
Fix deprecation warnings (halogenica#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored and sunpech committed Aug 17, 2024
1 parent 1ad191f commit 7427207
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.120.1
HUGO_VERSION: 0.130.0
steps:
- name: Install Hugo CLI
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
Expand All @@ -45,7 +45,7 @@ jobs:
--themesDir "../../"
--logLevel info
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ./exampleSite/public

8 changes: 4 additions & 4 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.120.1
HUGO_VERSION: 0.130.0
steps:
- name: Install Hugo CLI
run: |
Expand All @@ -38,7 +38,7 @@ jobs:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
Expand All @@ -51,7 +51,7 @@ jobs:
-s "./exampleSite/" \
--themesDir "../../"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ./exampleSite/public

Expand All @@ -69,4 +69,4 @@ jobs:
success()
&& github.ref == 'refs/heads/master'
&& github.repository == 'halogenica/beautifulhugo'
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
8 changes: 6 additions & 2 deletions exampleSite/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ pygmentsCodeFences = true
pygmentsCodefencesGuessSyntax = true
#pygmentsUseClassic = true
#pygmentOptions = "linenos=inline"
#disqusShortname = "XXX"
#googleAnalytics = "XXX"

[Services]
[Services.Disqus]
# Shortname = "XXX"
[Services.googleAnalytics]
# id = "XXX"

[Params]
# homeTitle = "Beautiful Hugo Theme" # Set a different text for the header on the home page
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if le hugo.Version "0.120.0" }}
{{ errorf "Please use Hugo version 0.120.0 or higher!" }}
{{ if le hugo.Version "0.124.0" }}
{{ errorf "Please use Hugo version 0.124.0 or higher!" }}
{{ end }}

<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

&nbsp;&bull;&nbsp;&copy;
{{ if .Site.Params.since }}
{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}
{{ .Site.Params.since }} - {{ .Site.Lastmod.Format "2006" }}
{{ else }}
{{ .Site.Params.copyright }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{ end }}
{{ end }}

{{ if .Site.IsMultiLingual }}
{{ if hugo.IsMultilingual }}
{{ if ge (len .Site.Languages) 3 }}
<li class="navlinks-container">
<a class="navlinks-parent" role="button" tabindex="0">{{ i18n "languageSwitcherLabel" }}</a>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/seo/structured/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"name": "{{ .Site.Params.author.name }}"
},
{{- end }}
"copyrightYear" : "{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}",
"copyrightYear" : "{{ .Site.Params.since }} - {{ .Site.Lastmod.Format "2006" }}",
{{ if not .PublishDate.IsZero -}}
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
{{- else if not .Date.IsZero -}}
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
command = "cd exampleSite && hugo --gc --themesDir ../.."

[build.environment]
HUGO_VERSION = "0.120.0"
HUGO_VERSION = "0.130.0"
HUGO_THEME = "repo"
HUGO_BASEURL = "/"
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ licenselink = "https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICE
description = "An adaptation of the Beautiful Jekyll theme"
tags = ["blog", "company", "portfolio", "projects", "minimal", "responsive", "seo", "google analytics", "bootstrap", "disqus", "light", "syntax highlighting", "multilingual", "portfolio", "projects", "mobile", "technical"]
features = ["blog", "company", "portfolio", "projects", "minimal", "responsive", "seo", "google analytics", "bootstrap", "disqus", "light", "syntax highlighting", "multilingual", "portfolio", "projects", "mobile", "technical"]
min_version = 0.120
min_version = 0.124

[author]
name = "halogenica"
Expand Down

0 comments on commit 7427207

Please sign in to comment.