From 515b4e0f0f9661bbef3ebf6b1b728eaa826ce7b2 Mon Sep 17 00:00:00 2001 From: Max Mehl Date: Wed, 18 Sep 2024 10:42:05 +0200 Subject: [PATCH 1/4] fix broken link --- content/credits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/credits.md b/content/credits.md index 389d8a3..fb5b557 100644 --- a/content/credits.md +++ b/content/credits.md @@ -10,5 +10,5 @@ We thank the following persons and projects: * The [port of the design to Hugo](https://github.com/caressofsteel/hugo-story) made by [@caressofsteel](https://github.com/caressofsteel). * Photos by * [Jakub Nawrot](https://unsplash.com/jacob_lens) - * [Alexander Popov](https://unsplash.com/5step5) + * [Alexander Popov](https://unsplash.com/5tep5) * [cmophoto.net](https://unsplash.com/cmophoto) From bf2229ab5f072c97441dc49bc569b4ae0503dfd6 Mon Sep 17 00:00:00 2001 From: Max Mehl Date: Wed, 18 Sep 2024 10:42:24 +0200 Subject: [PATCH 2/4] avoid linebreaks after URLs --- themes/openrail/layouts/shortcodes/relurl.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/openrail/layouts/shortcodes/relurl.html b/themes/openrail/layouts/shortcodes/relurl.html index 8ef6448..2729b1a 100644 --- a/themes/openrail/layouts/shortcodes/relurl.html +++ b/themes/openrail/layouts/shortcodes/relurl.html @@ -1 +1 @@ -{{ relURL (.Get 0) }} +{{- relURL (.Get 0) -}} From a7c60678b2eb4bf285c3d14bd98dd373c2ca1556 Mon Sep 17 00:00:00 2001 From: Max Mehl Date: Wed, 18 Sep 2024 10:45:54 +0200 Subject: [PATCH 3/4] bump hugo actions version --- .github/workflows/hugo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index 91454b5..da9b0d7 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Setup Hugo - uses: peaceiris/actions-hugo@v2.6.0 + uses: peaceiris/actions-hugo@v3.0.0 with: hugo-version: "0.132.2" extended: true From fdd640574ee07abeeda9c6ef7360f55c1e0f54de Mon Sep 17 00:00:00 2001 From: Max Mehl Date: Wed, 18 Sep 2024 10:42:42 +0200 Subject: [PATCH 4/4] include lychee to check for broken links --- .github/workflows/hugo.yaml | 36 +++++++++++++++++++++++++++++++++++- .gitignore | 3 +++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index da9b0d7..a531949 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -42,9 +42,32 @@ jobs: run: hugo - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-artifact@v4 with: + name: public path: ./public + include-hidden-files: true + retention-days: 1 + + # Checking links using lychee + linkchecker: + runs-on: ubuntu-22.04 + needs: build + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: public + path: . + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1 + with: + args: '-r 5 -u "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" --exclude sncf.com --exclude nge.flatland.cloud --max-concurrency 1 .' + # Fail on errors + fail: false + # TODO: Implement https://github.com/lycheeverse/lychee/issues/989 once it's done. Will help with LinkedIn rate limits # Deployment job deploy: @@ -56,6 +79,17 @@ jobs: # Only deploy if on main branch if: github.ref == 'refs/heads/main' steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: public + path: ./public + + - name: Upload pages artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./public + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore index 29db922..44b6f72 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,7 @@ hugo.linux # Temporary lock file while building /.hugo_build.lock +# lychee +.lycheecache + # End of https://www.toptal.com/developers/gitignore/api/hugo