Unified · Split
| @@ -8,7 +8,6 @@ module Docs · 7 unmodified lines | |||
| 8 | end | 8 | end |
| 9 | 9 | ||
| 10 | TYPE_BY_DIRECTORY = { | 10 | TYPE_BY_DIRECTORY = { |
| 11 | 'get-started' => 'Getting Started', | ||
| 12 | 'concepts' => 'Concepts', | 11 | 'concepts' => 'Concepts', |
| 13 | 'guides' => 'Guides', | 12 | 'guides' => 'Guides', |
| 14 | 'api' => 'API', | 13 | 'api' => 'API', |
| @@ -23,8 +22,9 @@ module Docs · 8 unmodified lines | |||
| 23 | 22 | ||
| 24 | def additional_entries | 23 | def additional_entries |
| 25 | if slug.start_with?('configuration') | 24 | if slug.start_with?('configuration') |
| 26 | css('h2[id] code').map do |node| | 25 | css('h2[id] code').each_with_object [] do |node, entries| |
| 27 | [node.content, node.parent['id']] | 26 | next if node.previous.try(:content).present? |
| 27 | entries << [node.content, node.parent['id']] | ||
| 28 | end | 28 | end |
| 29 | elsif slug.start_with?('api') | 29 | elsif slug.start_with?('api') |
| 30 | css('.header[id] code').each_with_object [] do |node, entries| | 30 | css('.header[id] code').each_with_object [] do |node, entries| |
| @@ -4,9 +4,9 @@ module Docs · 3 unmodified lines | |||
| 4 | self.type = 'webpack' | 4 | self.type = 'webpack' |
| 5 | 5 | ||
| 6 | version '2' do | 6 | version '2' do |
| 7 | self.release = '2.2.0' | 7 | self.release = '2.3.3' |
| 8 | self.base_url = 'https://webpack.js.org/' | 8 | self.base_url = 'https://webpack.js.org/' |
| 9 | self.root_path = 'get-started/' | 9 | self.root_path = 'guides/get-started/' |
| 10 | self.initial_paths = %w( | 10 | self.initial_paths = %w( |
| 11 | concepts/ | 11 | concepts/ |
| 12 | guides/ | 12 | guides/ |
| @@ -25,7 +25,6 @@ module Docs · 12 unmodified lines | |||
| 25 | options[:container] = '.page' | 25 | options[:container] = '.page' |
| 26 | options[:trailing_slash] = true | 26 | options[:trailing_slash] = true |
| 27 | options[:only_patterns] = [ | 27 | options[:only_patterns] = [ |
| 28 | /\Aget-started\//, | ||
| 29 | /\Aconcepts\//, | 28 | /\Aconcepts\//, |
| 30 | /\Aguides\//, | 29 | /\Aguides\//, |
| 31 | /\Aapi\//, | 30 | /\Aapi\//, |