An open API service indexing awesome lists of open source software.

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.

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