A nanoc check that validates HTML, CSS, and SVG output files locally with the Nu Html Checker (v.Nu).
Install v.Nu and place the vnu executable on your PATH.
Add this line to your application's Gemfile:
gem 'nanoc-checking-checks-vnu'And then execute:
$ bundle install
Or install it yourself as:
$ gem install nanoc-checking-checks-vnu
Add this line to a Ruby file inside your site's lib directory:
require 'nanoc/checking/checks/vnu'Then execute:
$ nanoc check vnu # prefix with `bundle exec` as appropriate
You can automatically run this check at deploy time by adding vnu to
the checking section of nanoc.yaml.
By default, CSS and SVG files are validated in addition to HTML files.
This can be changed by configuring the check in nanoc.yaml:
checks:
vnu:
also_check_css: no
also_check_svg: noYou can further disable particular errors by passing a value for the
--filterpattern option, which takes a regex matching the whole message:
checks:
vnu:
filterpattern: '.*color-mix.*'Bug reports and pull requests are welcome on GitHub at https://github.com/query/nanoc-checking-checks-vnu.
The gem is available as open source under the terms of the MIT License.