Back to Week 6 page »
Faster Validating
Download the vnu.jar file from GitHub.
- Go to the GitHub page: https://github.com/validator/validator.github.io
- Click on the releases link (middle of the page towards the top)
- Download the latest release of the
vnu.jar
file.
- Extract the
vnu.jar
file and copy it to your home folder (the one with your username)
Make sure all of your class files are downloaded to TempMedia
- Open the Terminal application (type terminal into Spotlight to find it)
- Type the following into Terminal exactly (make sure there's a space at the end)
cd
- Drag your website folder from a Finder window and drop it into the Terminal window. You should see the path to the folder appear.
- Press Enter
Copy the following to validate all of your html pages. The output will show up in the terminal window.
for file in $(find . -type f -name '*.html'); do
echo "### $file";
java -jar ~/vnu.jar --skip-non-html --errors-only --format text $file;
echo "";
echo "";
done;
Back to Week 6 page »