2026-03-02 16:24:52 +01:00
|
|
|
[tools]
|
2026-04-01 11:12:12 +02:00
|
|
|
hugo-extended = "0.159.1"
|
|
|
|
|
lychee = "latest"
|
|
|
|
|
|
|
|
|
|
[vars]
|
|
|
|
|
build_dir = "public"
|
|
|
|
|
|
|
|
|
|
[tasks.cleanup]
|
|
|
|
|
description = "Clean up the build destination directory"
|
|
|
|
|
run = "rm -r {{vars.build_dir}} || true"
|
|
|
|
|
|
|
|
|
|
[tasks.build]
|
|
|
|
|
depends = ["cleanup"]
|
|
|
|
|
description = "Build the static site using Hugo"
|
|
|
|
|
run = "hugo -d {{vars.build_dir}}"
|
|
|
|
|
|
|
|
|
|
[tasks.preview]
|
|
|
|
|
depends = ["cleanup"]
|
|
|
|
|
description = "Preview the site locally using Hugo's built-in server"
|
|
|
|
|
run = "hugo server"
|
|
|
|
|
|
|
|
|
|
[tasks.linkcheck]
|
2026-04-01 11:31:35 +02:00
|
|
|
depends = ["build"]
|
2026-04-01 11:12:12 +02:00
|
|
|
description = "Check for broken links using lychee"
|
|
|
|
|
run = '''
|
|
|
|
|
lychee \
|
|
|
|
|
--max-concurrency 5 --cache --max-cache-age 1h \
|
|
|
|
|
--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' \
|
2026-04-01 11:31:35 +02:00
|
|
|
--exclude 'glyphicons-halflings-regular\.(eot|woff|woff2|ttf|svg)' \
|
2026-04-01 11:12:12 +02:00
|
|
|
{{vars.build_dir}}/
|
|
|
|
|
'''
|