Sha256: 768f37e276aaf449eaf76d1ddcbbc215c593fb827944103b861483fd31e0547a
Contents?: true
Size: 882 Bytes
Versions: 12
Compression:
Stored size: 882 Bytes
Contents
# encoding: utf-8 namespace :validate do desc 'Validate the site\'s HTML files' task :html do # Load site site = Nanoc3::Site.new('.') if site.nil? $stderr.puts 'The current working directory does not seem to be a ' + 'valid/complete nanoc site directory; aborting.' exit 1 end # Validate validator = ::Nanoc3::Extra::Validators::W3C.new(site, :html) validator.run end desc 'Validate the site\'s CSS files' task :css do # Load site site = Nanoc3::Site.new(YAML.load_file(File.join(Dir.getwd, 'config.yaml'))) if site.nil? $stderr.puts 'The current working directory does not seem to be a ' + 'valid/complete nanoc site directory; aborting.' exit 1 end # Validate validator = ::Nanoc3::Extra::Validators::W3C.new(site, :css) validator.run end end
Version data entries
12 entries across 12 versions & 1 rubygems