From a0d1facf1c19114f0c67ff13d0eb6d2b3e354522 Mon Sep 17 00:00:00 2001 From: Falk Mielke Date: Fri, 21 Feb 2025 13:43:35 +0100 Subject: [PATCH 1/9] hugo_update: work with latest versions of hugo and minimo --- README.md | 4 ++-- config.toml | 2 +- layouts/partials/entry/meta/edit-page.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ebd7f1ac..a2eebc9a1 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The technology used to create the website is [Hugo](https://gohugo.io/), a stati 1. [Install hugo](https://gohugo.io/getting-started/installing/) 2. Clone the tutorials repository -3. In the cloned tutorials directory, install the theme with `git clone https://github.com/MunifTanjim/minimo.git --branch v2.9.0 themes/minimo` +3. In the cloned tutorials directory, install the theme with `git clone https://github.com/MunifTanjim/minimo.git themes/minimo` 4. Build and serve the site with `hugo server` For more information, see [Hugo's getting started documentation](https://gohugo.io/getting-started/usage/). @@ -48,4 +48,4 @@ For more information, see the [Hugo theme customization documentation](https://g ## License -[Creative Commons Attribution](https://creativecommons.org/licenses/by/4.0/) for [content](content) / [MIT License](https://github.com/inbo/tutorials/blob/master/LICENSE) for source code. \ No newline at end of file +[Creative Commons Attribution](https://creativecommons.org/licenses/by/4.0/) for [content](content) / [MIT License](https://github.com/inbo/tutorials/blob/master/LICENSE) for source code. diff --git a/config.toml b/config.toml index a0f0e176b..f553b1d70 100644 --- a/config.toml +++ b/config.toml @@ -12,7 +12,7 @@ copyright = "" disqusShortname = "" googleAnalytics = "" -Paginate = 1000 +pagination.pagerSize = 1000 preserveTaxonomyNames = true enableRobotsTXT = true # generate robots.txt diff --git a/layouts/partials/entry/meta/edit-page.html b/layouts/partials/entry/meta/edit-page.html index 7ebc3e2d2..476d85f79 100644 --- a/layouts/partials/entry/meta/edit-page.html +++ b/layouts/partials/entry/meta/edit-page.html @@ -11,7 +11,7 @@ {{ end }} {{ with .Site.Params.githublink.GithubEditLink }} - {{- partial "svg/icons" "github" -}} Improve this page + {{- partial "svg/icon" "github" -}} Improve this page {{ end }} {{ end }} From 6577e5a8a6e0ed4f495a453ac01f812b54fa7ed9 Mon Sep 17 00:00:00 2001 From: Falk Mielke Date: Fri, 21 Feb 2025 13:47:59 +0100 Subject: [PATCH 2/9] hugo_update: gha workflow version update --- .github/workflows/deploy-gh-pages.yml | 6 +++--- .github/workflows/generate-artifact-pr.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index c272c3d7f..1f2248f47 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -19,13 +19,13 @@ jobs: uses: actions/checkout@v3 with: repository: MunifTanjim/minimo - ref: v2.9.0 + ref: v2.10.1 path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@v3 with: - hugo-version: '0.88.1' + hugo-version: '0.119.0' # extended: true - name: Build diff --git a/.github/workflows/generate-artifact-pr.yml b/.github/workflows/generate-artifact-pr.yml index b7b5bb2ac..d8521c9b0 100644 --- a/.github/workflows/generate-artifact-pr.yml +++ b/.github/workflows/generate-artifact-pr.yml @@ -18,13 +18,13 @@ jobs: uses: actions/checkout@v3 with: repository: MunifTanjim/minimo - ref: v2.9.0 + ref: v2.10.1 path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@v3 with: - hugo-version: '0.88.1' + hugo-version: '0.119.0' # extended: true - name: Build From 1b5945bd3f6c7b46d477f47a7fa2b72283b35047 Mon Sep 17 00:00:00 2001 From: ElsLommelen Date: Mon, 18 May 2026 13:54:46 +0200 Subject: [PATCH 3/9] update GHA --- .github/workflows/deploy-gh-pages.yml | 8 ++++---- .github/workflows/generate-artifact-pr.yml | 8 ++++---- .github/workflows/remove_old_artifact.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index c272c3d7f..3ef9c4f52 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -10,20 +10,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout (tutorials) - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Checkout (theme) - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: MunifTanjim/minimo ref: v2.9.0 path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@32c7754 #v3.1.0 with: hugo-version: '0.88.1' # extended: true @@ -39,7 +39,7 @@ jobs: run: node themes/minimo/scripts/generate-search-index-lunr.js - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@4.0.0 + uses: JamesIves/github-pages-deploy-action@d92aa23 #v4.8.0 with: branch: gh-pages folder: public diff --git a/.github/workflows/generate-artifact-pr.yml b/.github/workflows/generate-artifact-pr.yml index b7b5bb2ac..f6076f350 100644 --- a/.github/workflows/generate-artifact-pr.yml +++ b/.github/workflows/generate-artifact-pr.yml @@ -8,21 +8,21 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout (tutorials) - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Checkout (theme) - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: MunifTanjim/minimo ref: v2.9.0 path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@32c7754 #v3.1.0 with: hugo-version: '0.88.1' # extended: true @@ -38,7 +38,7 @@ jobs: run: node themes/minimo/scripts/generate-search-index-lunr.js - name: Archive built site to an artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: pr-${{ env.PR_NUMBER }}-inbo-tutorials-website path: public diff --git a/.github/workflows/remove_old_artifact.yaml b/.github/workflows/remove_old_artifact.yaml index d4a765c54..3d52d0b7d 100644 --- a/.github/workflows/remove_old_artifact.yaml +++ b/.github/workflows/remove_old_artifact.yaml @@ -12,7 +12,7 @@ jobs: steps: - name: Remove old artifacts - uses: c-hive/gha-remove-artifacts@v1 + uses: c-hive/gha-remove-artifacts@44fc7ac #v1.4.0 with: age: '1 days' skip-recent: 5 From 8c1292b9bb9378528dd62e097235951e7d09d175 Mon Sep 17 00:00:00 2001 From: ElsLommelen Date: Mon, 18 May 2026 14:21:16 +0200 Subject: [PATCH 4/9] give full commit sha --- .github/workflows/deploy-gh-pages.yml | 4 ++-- .github/workflows/generate-artifact-pr.yml | 2 +- .github/workflows/remove_old_artifact.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 3ef9c4f52..006bee937 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -23,7 +23,7 @@ jobs: path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@32c7754 #v3.1.0 + uses: peaceiris/actions-hugo@32c7754570a8edd0ae33352fae4a8448f23858e9 #v3.1.0 with: hugo-version: '0.88.1' # extended: true @@ -39,7 +39,7 @@ jobs: run: node themes/minimo/scripts/generate-search-index-lunr.js - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@d92aa23 #v4.8.0 + uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f #v4.8.0 with: branch: gh-pages folder: public diff --git a/.github/workflows/generate-artifact-pr.yml b/.github/workflows/generate-artifact-pr.yml index f6076f350..8b9d833c5 100644 --- a/.github/workflows/generate-artifact-pr.yml +++ b/.github/workflows/generate-artifact-pr.yml @@ -22,7 +22,7 @@ jobs: path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@32c7754 #v3.1.0 + uses: peaceiris/actions-hugo@32c7754570a8edd0ae33352fae4a8448f23858e9 #v3.1.0 with: hugo-version: '0.88.1' # extended: true diff --git a/.github/workflows/remove_old_artifact.yaml b/.github/workflows/remove_old_artifact.yaml index 3d52d0b7d..259679e98 100644 --- a/.github/workflows/remove_old_artifact.yaml +++ b/.github/workflows/remove_old_artifact.yaml @@ -12,7 +12,7 @@ jobs: steps: - name: Remove old artifacts - uses: c-hive/gha-remove-artifacts@44fc7ac #v1.4.0 + uses: c-hive/gha-remove-artifacts@44fc7acaf1b3d0987da0e8d4707a989d80e9554b #v1.4.0 with: age: '1 days' skip-recent: 5 From 0184ebfdab50bb3e5695e09d75e400e091d435bc Mon Sep 17 00:00:00 2001 From: Falk Mielke Date: Tue, 26 May 2026 10:32:26 +0200 Subject: [PATCH 5/9] hugo_update: languageName -> label (v0.158.0 deprec) --- config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml b/config.toml index dbb3f1d00..8abc5a1c2 100644 --- a/config.toml +++ b/config.toml @@ -146,7 +146,7 @@ hrefTargetBlank = true # edit this block for your own language [languages.en] lang = "en" -languageName = "English" +label = "English" weight = 1 [markup] From 2bb149ef3c202fbc3c93662148c7205ff1deff0f Mon Sep 17 00:00:00 2001 From: Falk Mielke Date: Tue, 26 May 2026 10:34:06 +0200 Subject: [PATCH 6/9] hugo_update: languageCode -> locale (v0.158.0 deprec) --- config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 8abc5a1c2..84d992c53 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ theme = "minimo" -languageCode = "en-us" +locale = "en-us" title = "INBO Tutorials" ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "\\.qmd$", "_cache$", "\\.db$", "\\.csv$", "\\.sqlite$", "\\.geojson$"] From 8a40dbbbcf516b3207990da196832cb224846e7e Mon Sep 17 00:00:00 2001 From: Falk Mielke Date: Tue, 26 May 2026 10:34:35 +0200 Subject: [PATCH 7/9] hugo_update: [].Site.Data -> hugo.Data --- layouts/partials/widgets/recent_posts.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/widgets/recent_posts.html b/layouts/partials/widgets/recent_posts.html index 686dc3506..f7780c6fb 100644 --- a/layouts/partials/widgets/recent_posts.html +++ b/layouts/partials/widgets/recent_posts.html @@ -1,5 +1,5 @@ -{{- $defaultConfig := .Site.Data.config.default.widgets.recent_posts -}} -{{- $configData := ( or .Site.Data.config.widgets.recent_posts $defaultConfig ) -}} +{{- $defaultConfig := hugo.Data.config.default.widgets.recent_posts -}} +{{- $configData := ( or hugo.Data.config.widgets.recent_posts $defaultConfig ) -}} {{- $lang := .Site.Language.Lang -}} {{- $config := ( ( index $configData $lang ) | default $configData ) -}} From fcd5d6cdf0953812677249d1fecfaf0deb0e1e04 Mon Sep 17 00:00:00 2001 From: Falk Mielke Date: Tue, 26 May 2026 10:37:04 +0200 Subject: [PATCH 8/9] hugo_update: version tags; link to fork --- .github/workflows/deploy-gh-pages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 1f2248f47..92a136a6b 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -18,14 +18,14 @@ jobs: - name: Checkout (theme) uses: actions/checkout@v3 with: - repository: MunifTanjim/minimo - ref: v2.10.1 + repository: falkmielke/minimo + ref: update_202605 path: themes/minimo - name: Setup Hugo uses: peaceiris/actions-hugo@v3 with: - hugo-version: '0.119.0' + hugo-version: '0.161.1' # extended: true - name: Build From dffee6a610d71b330b3c44dd13734b0ff768988d Mon Sep 17 00:00:00 2001 From: Falk Mielke Date: Tue, 26 May 2026 10:41:33 +0200 Subject: [PATCH 9/9] hugo_update: readme on fork and local deploy --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2eebc9a1..e0c0f15e8 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,17 @@ The technology used to create the website is [Hugo](https://gohugo.io/), a stati 1. [Install hugo](https://gohugo.io/getting-started/installing/) 2. Clone the tutorials repository -3. In the cloned tutorials directory, install the theme with `git clone https://github.com/MunifTanjim/minimo.git themes/minimo` -4. Build and serve the site with `hugo server` +3. In the cloned tutorials directory, install the theme[^1] with `git clone https://github.com/MunifTanjim/minimo.git themes/minimo` +4. Build and serve the site + a) with `hugo server` OR + b) for debugging, with `hugo -D` and then serving manually `python -m http.server 8887 --bind localhost --directory /public/` + +[^1]: The `minimo` theme seems unmaintained; a (temporary?) fork with fixes of hugo deprecation warnings is available [here](https://github.com/falkmielke/minimo/tree/update_202605). + For more information, see [Hugo's getting started documentation](https://gohugo.io/getting-started/usage/). + ### Customizing the theme The tutorials website makes use of the Hugo theme [minimo](https://themes.gohugo.io/minimo/). This theme is not included in the repository, but [downloaded by GitHub pages](https://github.com/inbo/tutorials/blob/262f305ef66fd4fc46ef7b2a9dce36cd2ad3e0d9/.github/workflows/deploy-gh-pages.yml#L18-L23) at build time. This avoids clutter and changes to the theme itself. To customize the theme: