fix: broken links, add check to CI
All checks were successful
Website build and deploy / build (pull_request) Successful in 42s
All checks were successful
Website build and deploy / build (pull_request) Successful in 42s
This commit is contained in:
@@ -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}}/
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user