diff --git a/.gitea/workflows/hugo.yaml b/.gitea/workflows/hugo.yaml index a8c6ea0..0fa8d18 100644 --- a/.gitea/workflows/hugo.yaml +++ b/.gitea/workflows/hugo.yaml @@ -46,11 +46,19 @@ jobs: sed -i "s|__PROXY_URL__|${{ secrets.MATOMO_PROXY_URL }}|" static/config.php sed -i "s|__TOKEN_AUTH__|${{ secrets.MATOMO_TOKEN_AUTH }}|" static/config.php + - name: Check for broken links + run: | + if [ "${{ gitea.ref }}" = "refs/heads/main" ]; then + mise linkcheck --offline || true + else + mise linkcheck --offline + fi + - name: Build website with Hugo - run: hugo + run: mise run build - name: Copy website to host - uses: https://github.com/appleboy/scp-action@v1.0.0 + uses: https://github.com/appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1.0.0 with: host: mehl.mx username: maxmehl diff --git a/mise.toml b/mise.toml index 01dfdf8..4363091 100644 --- a/mise.toml +++ b/mise.toml @@ -14,18 +14,13 @@ depends = ["cleanup"] description = "Build the static site using Hugo" run = "hugo -d {{vars.build_dir}}" -[tasks.build-root] -depends = ["cleanup"] -description = "Build the static site using Hugo, not using subdirectory as baseURL" -run = "hugo --baseURL / -d {{vars.build_dir}}" - [tasks.preview] depends = ["cleanup"] description = "Preview the site locally using Hugo's built-in server" run = "hugo server" [tasks.linkcheck] -depends = ["build-root"] +depends = ["build"] description = "Check for broken links using lychee" run = ''' lychee \ @@ -33,5 +28,6 @@ lychee \ --index-files 'index.html' \ --root-dir {{vars.build_dir}}/ \ -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 'glyphicons-halflings-regular\.(eot|woff|woff2|ttf|svg)' \ {{vars.build_dir}}/ ''' diff --git a/themes/hugo-sustain/layouts/_default/list.html b/themes/hugo-sustain/layouts/_default/list.html index df99306..f6873bf 100644 --- a/themes/hugo-sustain/layouts/_default/list.html +++ b/themes/hugo-sustain/layouts/_default/list.html @@ -65,7 +65,9 @@
{{ if $selection }} - Subscribe to »{{.Title}}« + {{- with .OutputFormats.Get "RSS" -}} + Subscribe to »{{ $.Title }}« + {{- end -}} {{ else }} Subscribe to all posts {{ end }}