Sha256: c3852b5d81d05649df3ee70dc9232eaa754f7a44cc538c413859c3498302412d
Contents?: true
Size: 1.43 KB
Versions: 1
Compression:
Stored size: 1.43 KB
Contents
## About nanoc-tidy.rb is a [nanoc](https://nanoc.app) filter that utilizes [tidy-html5](https://github.com/htacg/tidy-html5) to nicely format, and detect / correct markup errors in HTML produced by template languages such as ERB - where misaligned indentation and other whitespace issues are often commonplace. ## Examples __Defaults__ The following is an example with the [default options](https://0x1eef.github.io/x/nanoc-tidy.rb/Nanoc/Tidy/Filter#default_options-class_method) being used: ``` ruby # Rules require "nanoc-tidy" compile "/index.html.erb" do filter(:erb) filter(:tidy) write("/index.html") end ``` __Options__ The following example forwards command-line options to [tidy-html5](https://github.com/htacg/tidy-html5): ```ruby # Rules require "nanoc-tidy" compile "/index.html.erb" do filter(:erb) filter(:tidy, "-upper" => true) write("/index.html") end ``` ## Sources * [Source code (GitHub)](https://github.com/0x1eef/nanoc-tidy.rb) * [Source code (GitLab)](https://gitlab.com/0x1eef/nanoc-tidy.rb) ## <a id='install'>Install</a> nanoc-tidy.rb is distributed as a RubyGem through its git repositories. <br> [GitHub](https://github.com/0x1eef/nanoc-tidy.rb), and [GitLab](https://gitlab.com/0x1eef/nanoc-tidy.rb) are available as sources. **Gemfile** ```ruby gem "nanoc-tidy.rb", github: "0x1eef/nanoc-tidy.rb" ``` ## License [BSD Zero Clause](https://choosealicense.com/licenses/0bsd/). <br> See [LICENSE](./LICENSE).
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nanoc-tidy.rb-0.2.0 | README.md |