Unified · Split
| @@ -4,10 +4,7 @@ module Docs · 3 unmodified lines | ||
| 4 | 4 | def call |
| 5 | 5 | if root_page? |
| 6 | 6 | css('h1').each { |node| node.name = 'h2' } |
| 7 | − css('li > h3').each { |node| node.name = 'div' } | |
| 8 | − elsif slug == 'cordova_events_events.md' | |
| 9 | − css('h1:not(:first-child)').each { |node| node.name = 'h3' } | |
| 10 | − css('h2').each { |node| node.name = 'h4' } | |
| 7 | + css('li > h2').each { |node| node.name = 'div' } | |
| 11 | 8 | end |
| 12 | 9 | |
| 13 | 10 | css('hr').remove |
| @@ -6,20 +6,14 @@ module Docs · 5 unmodified lines | ||
| 6 | 6 | end |
| 7 | 7 | |
| 8 | 8 | def get_type |
| 9 | − if subpath.start_with?('guide_platforms') | |
| 9 | + if subpath.start_with?('guide/platforms') | |
| 10 | 10 | name[/Amazon\ Fire\ OS|Android|BlackBerry|Firefox OS|iOS|Windows/] || 'Platform Guides' |
| 11 | + elsif subpath.start_with?('cordova/events') | |
| 12 | + 'Events' | |
| 11 | 13 | else |
| 12 | 14 | 'Guides' |
| 13 | 15 | end |
| 14 | 16 | end |
| 15 | − | |
| 16 | − def additional_entries | |
| 17 | − return [] unless slug == 'cordova_events_events.md' | |
| 18 | − | |
| 19 | − css('h3').map do |node| | |
| 20 | − [node.content, node['id'], 'Events'] | |
| 21 | − end | |
| 22 | − end | |
| 23 | 17 | end |
| 24 | 18 | end |
| 25 | 19 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Cordova < UrlScraper |
| 3 | 3 | self.name = 'Cordova' |
| 4 | 4 | self.type = 'cordova' |
| 5 | − self.version = '5.1.1' | |
| 5 | + self.version = '5.4.0' | |
| 6 | 6 | self.base_url = "http://cordova.apache.org/docs/en/#{version}/" |
| 7 | 7 | self.root_path = 'index.html' |
| 8 | 8 | self.links = { |
| @@ -11,10 +11,10 @@ module Docs · 2 unmodified lines | ||
| 11 | 11 | |
| 12 | 12 | html_filters.push 'cordova/clean_html', 'cordova/entries', 'title' |
| 13 | 13 | |
| 14 | − options[:container] = ->(filter) { filter.root_page? ? '#home' : '#content' } | |
| 14 | + options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page-toc-source' } | |
| 15 | 15 | options[:title] = false |
| 16 | 16 | options[:root_title] = 'Apache Cordova' |
| 17 | − options[:skip] = %w(_index.html guide_support_index.md.html) | |
| 17 | + options[:skip] = %w(page_index.html) | |
| 18 | 18 | |
| 19 | 19 | options[:attribution] = <<-HTML |
| 20 | 20 | © 2012-2015 The Apache Software Foundation<br> |