Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for broken links #36

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion content/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion themes/openrail/layouts/shortcodes/relurl.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ relURL (.Get 0) }}
{{- relURL (.Get 0) -}}