2025-03-03 22:34:06 +01:00
|
|
|
default:
|
|
|
|
@just --list
|
|
|
|
|
2024-11-07 08:50:05 +01:00
|
|
|
minify-sitemap:
|
|
|
|
xmllint --noblanks dist/sitemap.xml --output dist/sitemap.xml
|
|
|
|
|
2024-11-28 15:31:05 +01:00
|
|
|
serve-dev:
|
|
|
|
http-server dist
|
|
|
|
|
2025-03-04 00:39:15 +01:00
|
|
|
# {{{ Building
|
|
|
|
build:
|
|
|
|
cargo run
|
|
|
|
|
|
|
|
build-dev:
|
|
|
|
MOONYTHM_DRAFTS=1 cargo run
|
|
|
|
|
|
|
|
update-modification-dates:
|
|
|
|
MOONYTHM_UPDATE_LAST_MODIFIED=1 cargo run
|
2025-03-20 18:37:42 +01:00
|
|
|
git add last_modified.toml
|
2025-03-20 18:38:13 +01:00
|
|
|
git commit -m "Update \`last_modified.toml\`"
|
2025-03-04 00:39:15 +01:00
|
|
|
# }}}
|
2024-11-07 08:50:05 +01:00
|
|
|
# {{{ Linting
|
|
|
|
lint: lint-vnu lint-css lint-htmltest lint-htmlvalidate
|
|
|
|
|
|
|
|
lint-htmltest:
|
|
|
|
htmltest -c tooling/htmltest.yml dist
|
|
|
|
|
|
|
|
lint-htmlvalidate:
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
shopt -s globstar
|
|
|
|
shopt -s extglob
|
|
|
|
npx --prefix tooling \
|
|
|
|
html-validate -c tooling/htmlvalidate.json dist/**/*.html
|
|
|
|
|
|
|
|
lint-vnu:
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
shopt -s globstar
|
|
|
|
shopt -s extglob
|
|
|
|
|
|
|
|
output=$(
|
|
|
|
vnu --also-check-svg --no-langdetect \
|
|
|
|
--stdout --exit-zero-always \
|
|
|
|
dist/**/*.{html,svg} 2>&1 \
|
|
|
|
| grep -v "Trailing slash on void elements"
|
|
|
|
)
|
|
|
|
|
|
|
|
if [ -n "$output" ]; then
|
|
|
|
echo "$output"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "VNU checks passed succesfully"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
lint-css:
|
|
|
|
npx --prefix tooling stylelint dist/**/*.css \
|
|
|
|
--config ./tooling/stylelintrc.json \
|
|
|
|
--rd --rdd # All disables must come with an explanation and must be necessary
|
|
|
|
# }}}
|