html.rb 667 B

1234567891011121314151617181920212223242526
  1. module Docs
  2. class Html < Mdn
  3. self.name = 'HTML'
  4. self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element'
  5. html_filters.push 'html/clean_html', 'html/entries', 'title'
  6. options[:root_title] = 'HTML'
  7. options[:title] = ->(filter) do
  8. if filter.slug == 'Heading_Elements'
  9. 'Heading Elements'
  10. else
  11. "<#{filter.default_title}>"
  12. end
  13. end
  14. options[:replace_paths] = {
  15. '/h1' => '/Heading_Elements',
  16. '/h2' => '/Heading_Elements',
  17. '/h3' => '/Heading_Elements',
  18. '/h4' => '/Heading_Elements',
  19. '/h5' => '/Heading_Elements',
  20. '/h6' => '/Heading_Elements' }
  21. end
  22. end