Update Cordova documentation (5.4.0)

This commit is contained in:
Thibaut 2015-12-13 15:00:30 -05:00
parent eb4d9d0f06
commit 9651af7a06
3 changed files with 7 additions and 16 deletions

View file

@ -4,10 +4,7 @@ module Docs
def call
if root_page?
css('h1').each { |node| node.name = 'h2' }
css('li > h3').each { |node| node.name = 'div' }
elsif slug == 'cordova_events_events.md'
css('h1:not(:first-child)').each { |node| node.name = 'h3' }
css('h2').each { |node| node.name = 'h4' }
css('li > h2').each { |node| node.name = 'div' }
end
css('hr').remove

View file

@ -6,20 +6,14 @@ module Docs
end
def get_type
if subpath.start_with?('guide_platforms')
if subpath.start_with?('guide/platforms')
name[/Amazon\ Fire\ OS|Android|BlackBerry|Firefox OS|iOS|Windows/] || 'Platform Guides'
elsif subpath.start_with?('cordova/events')
'Events'
else
'Guides'
end
end
def additional_entries
return [] unless slug == 'cordova_events_events.md'
css('h3').map do |node|
[node.content, node['id'], 'Events']
end
end
end
end
end

View file

@ -2,7 +2,7 @@ module Docs
class Cordova < UrlScraper
self.name = 'Cordova'
self.type = 'cordova'
self.version = '5.1.1'
self.version = '5.4.0'
self.base_url = "http://cordova.apache.org/docs/en/#{version}/"
self.root_path = 'index.html'
self.links = {
@ -11,10 +11,10 @@ module Docs
html_filters.push 'cordova/clean_html', 'cordova/entries', 'title'
options[:container] = ->(filter) { filter.root_page? ? '#home' : '#content' }
options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page-toc-source' }
options[:title] = false
options[:root_title] = 'Apache Cordova'
options[:skip] = %w(_index.html guide_support_index.md.html)
options[:skip] = %w(page_index.html)
options[:attribution] = <<-HTML
&copy; 2012-2015 The Apache Software Foundation<br>