Skip to content

Commit

Permalink
Merge pull request #20 from Echtzeitsysteme/hotfix/theme-fixes-for-ne…
Browse files Browse the repository at this point in the history
…wer-hugo

Updates hugo to v0.134.2 + fixes deprecated config options in our theme
  • Loading branch information
maxkratz authored Sep 18, 2024
2 parents 8aa4077 + cf09492 commit 4fab8f9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
# Hugo version to use
VERSION: "0.101.0"
VERSION: "0.134.2"
# Hugo release source
HUGO_RELEASE_SRC: "https://github.com/gohugoio/hugo/releases"

Expand All @@ -20,7 +20,7 @@ jobs:
steps:
- name: Install Hugo
run: |
export HUGO_DEB_FILE=hugo_extended_${VERSION}_Linux-64bit.deb
export HUGO_DEB_FILE=hugo_extended_${VERSION}_linux-amd64.deb
echo "Using URL: $HUGO_RELEASE_SRC/download/v$VERSION/$HUGO_DEB_FILE"
wget -q $HUGO_RELEASE_SRC/download/v$VERSION/$HUGO_DEB_FILE
sudo dpkg -i $HUGO_DEB_FILE
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,30 @@ For contributing, you need the following things:

Please follow this (official) [installation guide of Hugo](https://gohugo.io/getting-started/installing/).

This project uses Hugo version `0.101.0` **extended** or newer.
This project uses Hugo version `0.134.2` **extended** or newer.
Please notice that some standard packet sources like Debian/Ubuntu **do not provide the minimum required version**.

The easiest way to get the required version up and running is to download it from [Github](https://github.com/gohugoio/hugo/releases/tag/v0.101.0) and install it by hand.
The easiest way to get the required version up and running is to download it from [Github](https://github.com/gohugoio/hugo/releases/tag/v0.134.2) and install it by hand.
Detailed steps for an installation from Github [are described on this page](https://gohugo.io/getting-started/installing/#install-hugo-from-tarball).

It is important that you can start Hugo from your terminal and that it states the correct version number.
You may check it using this command:

```bash
$ hugo version
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended linux/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
hugo v0.134.2+extended darwin/arm64 BuildDate=2024-09-10T10:46:33Z VendorInfo=brew
```

**Tip**: Use the exact version stated above to prevent version incompatibilities.
This version is also used by our [CI-Pipeline](#pipeline).

Required downloads may be found here:

* [Github release page](https://github.com/gohugoio/hugo/releases/tag/v0.101.0)
* [Direct download Linux (deb)](https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_extended_0.101.0_Linux-64bit.deb)
* [Direct download Linux (tar)](https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_extended_0.101.0_Linux-64bit.tar.gz)
* [Direct download macOS](https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_extended_0.101.0_macOS-64bit.tar.gz)
* [Direct download Windows](https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_extended_0.101.0_Windows-64bit.zip)
* [Github release page](https://github.com/gohugoio/hugo/releases/tag/v0.134.2)
* [Direct download Linux (deb)](https://github.com/gohugoio/hugo/releases/download/v0.134.2/hugo_extended_0.134.2_linux-amd64.deb)
* [Direct download Linux (tar)](https://github.com/gohugoio/hugo/releases/download/v0.134.2/hugo_extended_0.134.2_linux-amd64.tar.gz)
* [Direct download macOS](https://github.com/gohugoio/hugo/releases/download/v0.134.2/hugo_extended_0.134.2_darwin-universal.tar.gz)
* [Direct download Windows](https://github.com/gohugoio/hugo/releases/download/v0.134.2/hugo_extended_0.134.2_windows-amd64.zip)

### Usage of Hugo

Expand Down
6 changes: 6 additions & 0 deletions layouts/partials/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ $ctx := . }}
{{ with $.Site.Config.Services.Disqus.Shortname }}
{{ if ne . "yourdiscussshortname" }}
{{ template "_internal/disqus.html" $ctx }}
{{ end }}
{{ end }}
10 changes: 10 additions & 0 deletions layouts/partials/google-analytics-async.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ if not hugo.IsServer }}
{{ with $.Site.Config.Services.GoogleAnalytics.ID }}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
{{ end }}
{{ end }}

0 comments on commit 4fab8f9

Please sign in to comment.