chefclient.rb 734 B

12345678910111213141516171819202122232425262728
  1. module Docs
  2. class Chefclient < UrlScraper
  3. self.name = 'Chef Client'
  4. self.slug = 'chefclient'
  5. self.type = 'chefclient'
  6. self.version = '12.5'
  7. self.base_url = "https://docs.chef.io/release/#{version.sub '.', '-'}/"
  8. self.links = {
  9. home: 'https://www.chef.io/',
  10. docs: 'https://docs.chef.io/'
  11. }
  12. html_filters.push 'chefclient/entries', 'chefclient/clean_html'
  13. options[:fix_urls] = ->(url) do
  14. url.remove! %r{/release/[0-9\-+]/}
  15. url
  16. end
  17. options[:skip_patterns] = [/_images\//]
  18. options[:trailing_slash] = false
  19. options[:attribution] = <<-HTML
  20. &copy; 2015 Chef Software, Inc.<br>
  21. Creative Commons Attribution 3.0 Unported License.
  22. HTML
  23. end
  24. end