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
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 def get_name4 def get_name
5 return 'API' if subpath == '/api'5 return 'API' if subpath == '/api'
6 return 'Structures' if slug == 'api/structures'
6 7
7 name = at_css('h1, h2').content8 name = at_css('h1, h2').content
8 name.remove! 'Class: '9 name.remove! 'Class: '
@@ -14,7 +15,7 @@ module Docs · 5 unmodified lines
14 end15 end
15 16
16 def get_type17 def get_type
17 return 'API' if subpath == '/api'18 return 'API' if subpath == '/api' || slug == 'api/structures'
18 19
19 if subpath.start_with?('/tutorial') || subpath.in?(%w(/glossary /faq))20 if subpath.start_with?('/tutorial') || subpath.in?(%w(/glossary /faq))
20 'Guides'21 'Guides'
lib/docs/scrapers/electron.rb+5−2
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Electron < UrlScraper2 class Electron < UrlScraper
3 self.type = 'simple'3 self.type = 'simple'
4 self.base_url = 'https://www.electronjs.org/docs'4 self.base_url = 'https://www.electronjs.org/docs'
5 self.release = '12.0.0'5 self.release = '13.1.7'
6 self.links = {6 self.links = {
7 home: 'https://www.electronjs.org/',7 home: 'https://www.electronjs.org/',
8 code: 'https://github.com/electron/electron'8 code: 'https://github.com/electron/electron'
@@ -13,7 +13,10 @@ module Docs · 4 unmodified lines
13 options[:trailing_slash] = false13 options[:trailing_slash] = false
14 options[:container] = 'main'14 options[:container] = 'main'
15 options[:skip] = %w(guides development tutorial versions all)15 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 ]
17 options[:replace_paths] = {20 options[:replace_paths] = {
18 'api/web-view-tag' => 'api/webview-tag'21 'api/web-view-tag' => 'api/webview-tag'
19 }22 }