feat: add link check, enable clever link rendering
All checks were successful
Website build and deploy / build (push) Successful in 1m22s
All checks were successful
Website build and deploy / build (push) Successful in 1m22s
This commit is contained in:
@@ -12,6 +12,9 @@ summaryLength = 50
|
||||
leftDoubleQuote = '“'
|
||||
rightDoubleQuote = '”'
|
||||
|
||||
[markup.goldmark.renderHooks.link]
|
||||
useEmbedded = "fallback"
|
||||
|
||||
[permalinks]
|
||||
blog = "/blog/:year/:slug"
|
||||
|
||||
|
||||
37
mise.toml
37
mise.toml
@@ -1,2 +1,37 @@
|
||||
[tools]
|
||||
hugo-extended = "0.157.0"
|
||||
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.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"]
|
||||
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' \
|
||||
{{vars.build_dir}}/
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user