mirror of https://github.com/freeCodeCamp/devdocs
parent
333b67d57d
commit
eb82f6024c
@ -0,0 +1,15 @@
|
|||||||
|
module Docs
|
||||||
|
class Pony
|
||||||
|
class CleanHtmlFilter < Filter
|
||||||
|
def call
|
||||||
|
css('.headerlink').remove
|
||||||
|
|
||||||
|
css('pre').each do |node|
|
||||||
|
node.content = node.content
|
||||||
|
end
|
||||||
|
|
||||||
|
doc
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -1,9 +0,0 @@
|
|||||||
module Docs
|
|
||||||
class Pony
|
|
||||||
class ContainerFilter < Filter
|
|
||||||
def call
|
|
||||||
css('article')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,18 +1,27 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Pony < UrlScraper
|
class Pony < UrlScraper
|
||||||
self.type = 'pony'
|
self.type = 'simple'
|
||||||
self.release = '0.25.0'
|
self.release = '0.30.0'
|
||||||
self.base_url = 'https://stdlib.ponylang.io/'
|
self.base_url = 'https://stdlib.ponylang.io/'
|
||||||
|
self.links = {
|
||||||
|
home: 'https://www.ponylang.io/',
|
||||||
|
code: 'https://github.com/ponylang/ponyc'
|
||||||
|
}
|
||||||
|
|
||||||
html_filters.push 'pony/container', 'pony/entries'
|
html_filters.push 'pony/clean_html', 'pony/entries'
|
||||||
|
|
||||||
options[:attribution] = <<-HTML
|
options[:attribution] = <<-HTML
|
||||||
© 2016-2018, The Pony Developers<br>
|
© 2016-2018, The Pony Developers<br>
|
||||||
© 2014-2015, Causality Ltd.<br>
|
© 2014-2015, Causality Ltd.<br>
|
||||||
Licensed under the <a href="https://github.com/ponylang/ponyc/blob/master/LICENSE">BSD 2-Clause License</a>
|
Licensed under the BSD 2-Clause License.
|
||||||
HTML
|
HTML
|
||||||
|
|
||||||
|
options[:container] = 'article'
|
||||||
options[:trailing_slash] = false
|
options[:trailing_slash] = false
|
||||||
options[:skip_patterns] = [/src/]
|
options[:skip_patterns] = [/src/, /stdlib--index/]
|
||||||
|
|
||||||
|
def get_latest_version(opts)
|
||||||
|
get_latest_github_release('ponylang', 'ponyc', opts)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in new issue