diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 118a4259..6c3ae26f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -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 @@ -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 diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 015785be..8cb72026 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -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: | @@ -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 @@ -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 @@ -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 diff --git a/README.md b/README.md index d6fd30ab..3c77a4f9 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,15 @@ If you need to put a Disclaimer on your website (e.g. "My views are my own and n ### Google Analytics -To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `hugo.toml`. +Sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID. + +To use this feature add your Google Analytics ID to the hugo.toml file like this: + +``` +[services] + [services.googleAnalytics] + id = '' +``` Note that the Google Analytics tracking code will only be inserted into the page when the site isn't served on Hugo's built-in server, to prevent tracking from local testing environments. diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index 3b2abc01..126e53b9 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -11,6 +11,7 @@ pygmentsCodeFences = true pygmentsCodefencesGuessSyntax = true #pygmentsUseClassic = true #pygmentOptions = "linenos=inline" + # [services] # [services.disqus] # shortname = '' diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 44f42463..92057637 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,9 +1,5 @@ -{{ if le hugo.Version "0.120.0" }} - {{ errorf "Please use Hugo version 0.120.0 or higher!" }} -{{ end }} - -{{ if not (eq .Site.DisqusShortname "") }} - {{ errorf "Your use of disqusShortname is deprecated by Hugo; Please reference the README.md for further instructions. This error message will be removed in the future because we are also using .Site.DisqusShortname for checking this." }} +{{ if le hugo.Version "0.124.0" }} + {{ errorf "Please use Hugo version 0.124.0 or higher!" }} {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 2b52f2d5..ebfe510c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -56,9 +56,9 @@  • © {{ if .Site.Params.since }} - {{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }} + {{ .Site.Params.since }} - {{ .Site.Lastmod.Format "2006" }} {{ else }} - {{ .Site.LastChange.Format "2006" }} + {{ .Site.Lastmod.Format "2006" }} {{ end }} {{ if .Site.Title }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 5594b294..78cf457d 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -29,7 +29,7 @@ {{ end }} {{ end }} - {{ if .Site.IsMultiLingual }} + {{ if hugo.IsMultilingual }} {{ if ge (len .Site.Languages) 3 }}