You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devdocs/lib/docs/scrapers/crystal.rb

23 lines
675 B

module Docs
class Crystal < UrlScraper
self.name = "Crystal"
self.type = "crystal"
self.base_url = "https://github.com/crystal-lang/crystal-book"
self.initial_paths = %w(/blob/master/SUMMARY.md)
self.links = {
home: "https://crystal-lang.org/",
code: "https://github.com/crystal-lang/crystal"
}
html_filters.push "crystal/clean_html", "crystal/entries"
options[:container] = ".entry-content"
options[:only_patterns] = [/\/blob\/master\/.*\.md/]
options[:skip] = %w(/blob/master/README.md)
options[:attribution] = <<-HTML
<a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0</a>
HTML
end
end