mirror of https://github.com/freeCodeCamp/devdocs
parent
66d3228f76
commit
438fa8e6d0
@ -0,0 +1,9 @@
|
||||
module Docs
|
||||
class Brew
|
||||
class CleanHtmlFilter < Filter
|
||||
def call
|
||||
doc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,14 @@
|
||||
module Docs
|
||||
class Brew
|
||||
class EntriesFilter < Docs::EntriesFilter
|
||||
def get_name
|
||||
at_css('h1').content
|
||||
end
|
||||
|
||||
def get_type
|
||||
name
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,22 @@
|
||||
module Docs
|
||||
class Brew < UrlScraper
|
||||
self.name = 'Homebrew'
|
||||
self.type = 'brew'
|
||||
self.release = '1.3.6'
|
||||
self.base_url = 'https://docs.brew.sh'
|
||||
self.root_path = '/'
|
||||
self.links = {
|
||||
home: 'https://brew.sh',
|
||||
code: 'https://github.com/Homebrew/brew'
|
||||
}
|
||||
|
||||
options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page' }
|
||||
|
||||
html_filters.push 'brew/entries', 'brew/clean_html'
|
||||
|
||||
options[:attribution] = <<-HTML
|
||||
Homebrew was created by Max Howell. <br>
|
||||
Licensed under the BSD 2-Clause License.
|
||||
HTML
|
||||
end
|
||||
end
|
After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 23 KiB |
Loading…
Reference in new issue