Update Electron documentation (13.1.7)

pull/1598/head
Enoc 4 years ago
parent 1b0eed0e30
commit 0bb5d3e4a9

@ -3,6 +3,7 @@ module Docs
class EntriesFilter < Docs::EntriesFilter class EntriesFilter < Docs::EntriesFilter
def get_name def get_name
return 'API' if subpath == '/api' return 'API' if subpath == '/api'
return 'Structures' if slug == 'api/structures'
name = at_css('h1, h2').content name = at_css('h1, h2').content
name.remove! 'Class: ' name.remove! 'Class: '
@ -14,7 +15,7 @@ module Docs
end end
def get_type def get_type
return 'API' if subpath == '/api' return 'API' if subpath == '/api' || slug == 'api/structures'
if subpath.start_with?('/tutorial') || subpath.in?(%w(/glossary /faq)) if subpath.start_with?('/tutorial') || subpath.in?(%w(/glossary /faq))
'Guides' 'Guides'

@ -2,7 +2,7 @@ module Docs
class Electron < UrlScraper class Electron < UrlScraper
self.type = 'simple' self.type = 'simple'
self.base_url = 'https://www.electronjs.org/docs' self.base_url = 'https://www.electronjs.org/docs'
self.release = '12.0.0' self.release = '13.1.7'
self.links = { self.links = {
home: 'https://www.electronjs.org/', home: 'https://www.electronjs.org/',
code: 'https://github.com/electron/electron' code: 'https://github.com/electron/electron'
@ -13,7 +13,10 @@ module Docs
options[:trailing_slash] = false options[:trailing_slash] = false
options[:container] = 'main' options[:container] = 'main'
options[:skip] = %w(guides development tutorial versions all) options[:skip] = %w(guides development tutorial versions all)
options[:skip_patterns] = [/\/history\z/] options[:skip_patterns] = [
/\/history\z/,
/\/latest/ # beta site
]
options[:replace_paths] = { options[:replace_paths] = {
'api/web-view-tag' => 'api/webview-tag' 'api/web-view-tag' => 'api/webview-tag'
} }

Loading…
Cancel
Save