diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 5609e81f..59167ce4 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -35,7 +35,7 @@ jobs: strategy: matrix: hugo: - - '0.48' # min version + - '0.54.0' # min version - '0.58.2' # https://github.com/gohugoio/hugoThemes/issues/682 - '0.59.1' # last major version without goldmark renderer - '0.60.1' # first major version with goldmark renderer @@ -44,6 +44,7 @@ jobs: - '0.86.1' # https://github.com/gohugoio/hugo/issues/9150 - '0.93.3' # https://github.com/gohugoio/hugo/commit/837fdfdf45014e3d5ef3b00b01548b68a4489c5f - '0.123.8' # https://github.com/gohugoio/hugo/issues/12080 + - '0.132.2' # .Site.IsServer deprecation ERROR - 'latest' fail-fast: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aab69c8c..4b0bebaa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,7 +100,7 @@ to those feedback, otherwise the PR will be closed after 2-4 weeks of inactivity ### Pull Request Contribution Prerequisites * You have Node & npm installed -* You have Hugo installed at v0.48.0+ +* You have Hugo installed at v0.54.0+ * You are familiar with Git ### Pull Request Process diff --git a/exampleSite/content/docs/getting-started.md b/exampleSite/content/docs/getting-started.md index 638383d0..71d71160 100644 --- a/exampleSite/content/docs/getting-started.md +++ b/exampleSite/content/docs/getting-started.md @@ -22,7 +22,7 @@ with the [Hugo](https://gohugo.io/) static site generator. ## Installation Before installing the **Mainroad** theme, make sure that you've -[installed **Hugo** (version 0.48 or later)](https://gohugo.io/getting-started/quick-start/#step-1-install-hugo) and +[installed **Hugo** (version 0.54.0 or later)](https://gohugo.io/getting-started/quick-start/#step-1-install-hugo) and [created a new site](https://gohugo.io/getting-started/quick-start/#step-2-create-a-new-site). To learn how to install Hugo, visit [Hugo Documentation](https://gohugo.io/getting-started/installing/). diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 919f19f9..e31fe1b3 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -35,7 +35,13 @@ {{- end }} - {{- if not .Site.IsServer }} + {{- $server := "" }} + {{- if gt (int (index (split hugo.Version ".") 1)) "120" }} + {{ $server = hugo.IsServer }} + {{- else }} + {{ $server = .Site.IsServer }} + {{- end -}} + {{- if not $server }} {{ template "_internal/google_analytics.html" . }} {{- end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 5b15071a..81e59433 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,5 +1,11 @@ -{{ if and .Site.Config.Services.Disqus.Shortname (index .Params "comments" | default "true") (not .Site.IsServer) }} +{{- $server := "" }} +{{- if ge (int (index (split hugo.Version ".") 1)) "120" }} + {{- $server = hugo.IsServer }} +{{- else }} + {{- $server = .Site.IsServer }} +{{- end }} +{{- if and .Site.Config.Services.Disqus.Shortname (index .Params "comments" | default "true") (not $server) }}
{{ template "_internal/disqus.html" . }}
-{{ end }} \ No newline at end of file +{{- end }} \ No newline at end of file diff --git a/theme.toml b/theme.toml index 4e5c65ea..047d02ac 100644 --- a/theme.toml +++ b/theme.toml @@ -6,7 +6,7 @@ homepage = "https://github.com/vimux/mainroad/" demosite = "https://mainroad-demo.netlify.app/" tags = ["blog", "responsive", "light", "multilingual", "customizable", "widgets", "wordpress"] features = ["blog", "responsive", "multilingual", "widgets", "rss", "disqus", "google analytics", "wordpress"] -min_version = "0.48" +min_version = "0.54.0" [author] name = "Vimux"