Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nanoc-tidy.rb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanoc-tidy.rb

  • 0.8.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 16 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc