1
0

mkdocs.rb 436 B

12345678910111213141516171819
  1. module Docs
  2. class Mkdocs < UrlScraper
  3. self.abstract = true
  4. self.type = 'mkdocs'
  5. html_filters.push 'mkdocs/clean_html'
  6. private
  7. def handle_response(response)
  8. # Some scrapped urls don't have ending slash
  9. # which leads to page duplication
  10. if !response.url.path.ends_with?('/') && !response.url.path.ends_with?('index.html')
  11. response.url.path << '/'
  12. end
  13. super
  14. end
  15. end
  16. end