jekyll.rb 903 B

123456789101112131415161718192021222324252627282930313233343536
  1. module Docs
  2. class Jekyll < UrlScraper
  3. self.type = 'jekyll'
  4. self.release = '4.1.1'
  5. self.base_url = 'https://jekyllrb.com/docs/'
  6. self.root_path = 'index.html'
  7. self.links = {
  8. home: 'https://jekyllrb.com/',
  9. code: 'https://github.com/jekyll/jekyll'
  10. }
  11. html_filters.push 'jekyll/clean_html', 'jekyll/entries'
  12. options[:trailing_slash] = true
  13. options[:skip] = %w(sites/ upgrading/)
  14. options[:skip_patterns] = [
  15. /conduct/,
  16. /history/,
  17. /maintaining/,
  18. /contributing/,
  19. ]
  20. options[:replace_paths] = {
  21. 'templates/' => 'liquid/'
  22. }
  23. options[:attribution] = <<-HTML
  24. &copy; 2020 Jekyll Core Team and contributors<br>
  25. Licensed under the MIT license.
  26. HTML
  27. def get_latest_version(opts)
  28. doc = fetch_doc('https://jekyllrb.com/docs/', opts)
  29. doc.at_css('.meta a').content[1..-1]
  30. end
  31. end
  32. end