bootstrap.rb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. module Docs
  2. class Bootstrap < UrlScraper
  3. self.type = 'bootstrap'
  4. self.links = {
  5. home: 'https://getbootstrap.com/',
  6. code: 'https://github.com/twbs/bootstrap'
  7. }
  8. options[:trailing_slash] = true
  9. options[:attribution] = <<-HTML
  10. &copy; 2011&ndash;2018 Twitter, Inc.<br>
  11. &copy; 2011&ndash;2018 The Bootstrap Authors<br>
  12. Code licensed under the MIT License.<br>
  13. Documentation licensed under the Creative Commons Attribution License v3.0.
  14. HTML
  15. html_filters.push 'parse_cf_email'
  16. version '4' do
  17. self.release = '4.0.0'
  18. self.base_url = 'https://getbootstrap.com/docs/4.0/'
  19. self.root_path = 'getting-started/introduction/'
  20. html_filters.push 'bootstrap/entries_v4', 'bootstrap/clean_html_v4'
  21. options[:only_patterns] = [/\Agetting-started\//, /\Alayout\//, /\Acontent\//, /\Acomponents\//, /\Autilities\//, /\Amigration\//]
  22. end
  23. version '3' do
  24. self.release = '3.3.7'
  25. self.base_url = 'https://getbootstrap.com/docs/3.3/'
  26. self.root_path = 'getting-started/'
  27. html_filters.push 'bootstrap/entries_v3', 'bootstrap/clean_html_v3'
  28. options[:only] = %w(getting-started/ css/ components/ javascript/)
  29. end
  30. end
  31. end