1
0

bootstrap.rb 946 B

123456789101112131415161718192021222324252627282930313233
  1. module Docs
  2. class Bootstrap < UrlScraper
  3. options[:attribution] = <<-HTML
  4. &copy; 2011&ndash;2016 Twitter, Inc.<br>
  5. Code licensed under the MIT License.<br>
  6. Documentation licensed under the Creative Commons Attribution License v3.0.
  7. HTML
  8. version '3' do
  9. self.type = 'bsv3'
  10. self.release = '3.3.7'
  11. self.base_url = 'https://getbootstrap.com/'
  12. self.root_path = 'getting-started'
  13. self.links = {
  14. home: 'https://getbootstrap.com/',
  15. code: 'https://github.com/twbs/bootstrap'
  16. }
  17. html_filters.push 'bootstrap/entries_v3', 'bootstrap/clean_html_v3'
  18. options[:trailing_slash] = false
  19. options[:only] = %w(getting-started css components javascript)
  20. end
  21. private
  22. def handle_response(response)
  23. response.effective_url.scheme = 'https'
  24. response.effective_url.path = response.effective_url.path.remove(/\/\z/)
  25. super
  26. end
  27. end
  28. end