History

Update Electron documentation (13.1.7)

Enoc committed 5 years ago

Commit 0bb5d3e1 parent 1b0eed02 files · +7 −3Browse files

Unified · Split

2 files
  1. lib/docs/filters/electron/entries.rb +2 −1
  2. lib/docs/scrapers/electron.rb +5 −2
lib/docs/filters/electron/entries.rb+2−1
@@ -3,6 +3,7 @@ module Docs · 2 unmodified lines
33 class EntriesFilter < Docs::EntriesFilter
44 def get_name
55 return 'API' if subpath == '/api'
6+ return 'Structures' if slug == 'api/structures'
67
78 name = at_css('h1, h2').content
89 name.remove! 'Class: '
@@ -14,7 +15,7 @@ module Docs · 5 unmodified lines
1415 end
1516
1617 def get_type
17− return 'API' if subpath == '/api'
18+ return 'API' if subpath == '/api' || slug == 'api/structures'
1819
1920 if subpath.start_with?('/tutorial') || subpath.in?(%w(/glossary /faq))
2021 'Guides'
lib/docs/scrapers/electron.rb+5−2
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Electron < UrlScraper
33 self.type = 'simple'
44 self.base_url = 'https://www.electronjs.org/docs'
5− self.release = '12.0.0'
5+ self.release = '13.1.7'
66 self.links = {
77 home: 'https://www.electronjs.org/',
88 code: 'https://github.com/electron/electron'
@@ -13,7 +13,10 @@ module Docs · 4 unmodified lines
1313 options[:trailing_slash] = false
1414 options[:container] = 'main'
1515 options[:skip] = %w(guides development tutorial versions all)
16− options[:skip_patterns] = [/\/history\z/]
16+ options[:skip_patterns] = [
17+ /\/history\z/,
18+ /\/latest/ # beta site
19+ ]
1720 options[:replace_paths] = {
1821 'api/web-view-tag' => 'api/webview-tag'
1922 }