mirror of https://github.com/freeCodeCamp/devdocs
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.
23 lines
675 B
23 lines
675 B
9 years ago
|
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
|