https://github.com/query/nanoc-checking-checks-vnu
A nanoc check for validating HTML, CSS, and SVG files with the v.Nu validator.
https://github.com/query/nanoc-checking-checks-vnu
css html nanoc ruby svg validation vnu
Last synced: 5 months ago
JSON representation
A nanoc check for validating HTML, CSS, and SVG files with the v.Nu validator.
- Host: GitHub
- URL: https://github.com/query/nanoc-checking-checks-vnu
- Owner: query
- License: mit
- Created: 2020-06-05T03:16:54.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-10T14:37:50.000Z (over 1 year ago)
- Last Synced: 2025-09-30T11:20:02.952Z (9 months ago)
- Topics: css, html, nanoc, ruby, svg, validation, vnu
- Language: Ruby
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Nanoc::Checking::Checks::Vnu
A [nanoc check][nanoc-check] that validates HTML, CSS, and SVG output files
locally with [the Nu Html Checker][vnu] (v.Nu).
[nanoc-check]: https://nanoc.ws/doc/testing/
[vnu]: https://validator.github.io/validator/
## Installation
Install v.Nu and place the `vnu` executable on your `PATH`.
Add this line to your application's Gemfile:
```ruby
gem 'nanoc-checking-checks-vnu'
```
And then execute:
$ bundle install
Or install it yourself as:
$ gem install nanoc-checking-checks-vnu
## Usage
Add this line to a Ruby file inside your site's `lib` directory:
```ruby
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`][nanoc-check-deploy].
By default, CSS and SVG files are validated in addition to HTML files.
This can be changed by configuring the check in `nanoc.yaml`:
```yaml
checks:
vnu:
also_check_css: no
also_check_svg: no
```
You can further disable particular errors by passing a value for the
`--filterpattern` option, which takes a regex matching the whole message:
```yaml
checks:
vnu:
filterpattern: '.*color-mix.*'
```
[nanoc-check-deploy]: https://nanoc.ws/doc/testing/#running-checks-before-deploying
## Contributing
Bug reports and pull requests are welcome on GitHub at
.
## License
The gem is available as open source under the terms of the [MIT License][mit].
[mit]: https://opensource.org/licenses/MIT