electron: update to 11.0.1

pull/1351/head
samfundev 4 years ago
parent 23b4378582
commit d495f49ef6
No known key found for this signature in database
GPG Key ID: 5157E7288829EF25

@ -258,7 +258,7 @@ credits = [
'https://api.drupal.org/api/drupal/LICENSE.txt'
], [
'Electron',
'2013-2018 GitHub Inc.',
'GitHub Inc.',
'MIT',
'https://raw.githubusercontent.com/electron/electron/master/LICENSE'
], [

@ -11,9 +11,13 @@ module Docs
if root_page?
doc.child.before('<h1>Electron Documentation</h1>')
css("div.subtron, div.py-6").remove
css('h2 > a').each do |node|
node.before(node.children).remove
end
else
@doc = doc.at_css('div.docs > div.markdown-body')
end
at_css('h2').name = 'h1' if !at_css('h1') && at_css('h2')

@ -1,17 +1,17 @@
module Docs
class Electron < UrlScraper
self.type = 'simple'
self.base_url = 'https://electronjs.org/docs'
self.release = '2.0.2'
self.base_url = 'https://www.electronjs.org/docs'
self.release = '11.0.1'
self.links = {
home: 'https://electronjs.org/',
home: 'https://www.electronjs.org/',
code: 'https://github.com/electron/electron'
}
html_filters.push 'electron/clean_html', 'electron/entries'
options[:trailing_slash] = false
options[:container] = '.page-section > .container, .page-section > .container-narrow'
options[:container] = 'main'
options[:skip] = %w(guides development tutorial versions all)
options[:skip_patterns] = [/\/history\z/]
options[:replace_paths] = {
@ -19,12 +19,12 @@ module Docs
}
options[:attribution] = <<-HTML
&copy; 2013&ndash;2018 GitHub Inc.<br>
&copy; GitHub Inc.<br>
Licensed under the MIT license.
HTML
def get_latest_version(opts)
doc = fetch_doc('https://electronjs.org/docs', opts)
doc = fetch_doc('https://www.electronjs.org/docs', opts)
doc.at_css('.docs-version').content
end
end

Loading…
Cancel
Save