bootstrap.rb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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;2017 Twitter, Inc.<br>
  11. &copy; 2011&ndash;2017 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. version '4' do
  16. self.release = '4.0.0-beta.3'
  17. self.base_url = 'https://getbootstrap.com/docs/4.0/'
  18. self.root_path = 'getting-started/introduction/'
  19. html_filters.push 'bootstrap/entries_v4', 'bootstrap/clean_html_v4'
  20. options[:only_patterns] = [/\Agetting-started\//, /\Alayout\//, /\Acontent\//, /\Acomponents\//, /\Autilities\//, /\Amigration\//]
  21. end
  22. version '3' do
  23. self.release = '3.3.7'
  24. self.base_url = 'https://getbootstrap.com/docs/3.3/'
  25. self.root_path = 'getting-started/'
  26. html_filters.push 'bootstrap/entries_v3', 'bootstrap/clean_html_v3'
  27. options[:only] = %w(getting-started/ css/ components/ javascript/)
  28. end
  29. end
  30. end