A sample site for testing w3 validator against @thulite/images
All images added using markdown fail w3 validator https://github.com/validator/validator validation.
- Set up a test site with an Markdown image in a blog post
npm create thulite@latest thulite-image-validation-test -- --template doks
cd thulite-image-validation-test
npm install
hugo new content/blog/image-test-post/index.md
- Add an image to the post directory. E.g.
cd content/blog/image-test-post
wget https://www.route93.ca/wp-content/uploads/WyeMarsh2.jpg
cd -
- Edit the blog post
code content/blog/image-test-post/index.md
- Set
draft: false
- Add the image to the content section of
index.md
. E.g.
- Refresh the site
- Press Ctrl-C (there seems to be an issue with the Hugo server v0.148.2 when adding new content)
- Restart the hugo server:
npm run dev
- Browse to new post (
http://localhost:1313/blog/image-test-post/
) - Observe the image is displayed
- Cancel the server (Ctrl-C)
- Build the site:
hugo --gc
- Obtain and install W3 Nu Validator
- Download the latest release from
https://github.com/validator/validator/releases
- E.g.
wget https://github.com/validator/validator/releases/download/latest/vnu.jar
- E.g.
- Ensure you have a recent-ish Java JRE (I use openjdk-17-jre from Debian 12 'Bookworm')
- Download the latest release from
https://github.com/validator/validator/releases
- Use the Validator and observe the results
- Execute
java -jar ./vnu.jar --skip-non-html $(find public -name '*.html' | tr $'\n' ' ')
- Execute