0.0
The project is in a healthy, maintained state
nanoc-tidy.rb = nanoc + tidy-html5
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 4.12
~> 3.0
~> 2.1
~> 3.5
~> 1.13
~> 3.6
~> 0.9
~> 0.6
~> 13.2

Runtime

~> 0.5
~> 0.12.4
 Project Readme

About

nanoc-tidy.rb is a nanoc filter that adds tidy-html5 support to nanoc.
The filter can format and validate HTML produced during the nanoc build process.

Examples

Defaults

The following example executes tidy with the default settings.
See Nanoc::Tidy.default_argv for more details:

# Rules
require "nanoc-tidy"
compile "/index.html.erb" do
  layout("/default.*")
  filter(:erb)
  filter(:tidy)
  write("/index.html")
end

Option: argv

The argv option forwards command line arguments directly to the tidy-html5 executable.
Nanoc::Tidy.default_argv returns the default command line arguments forwarded to tidy-html5:

# Rules
require "nanoc-tidy"
compile "/index.html.erb" do
  layout("/default.*")
  filter(:erb)
  filter(:tidy, argv: ["-upper"])
  write("/index.html")
end

Option: exe

The "exe" option can be used to change the default executable from "tidy5" to something else, the most common alternative might be "tidy":

# Rules
require "nanoc-tidy"
compile "/index.html.erb" do
  layout("/default.*")
  filter(:erb)
  filter(:tidy, exe: "tidy")
  write("/index.html")
end

Install

nanoc-tidy.rb can be installed via rubygems.org:

gem install nanoc-tidy.rb

Sources

License

BSD Zero Clause
See LICENSE