Update Vue.js documentation (1.0.4)

This commit is contained in:
Thibaut 2015-11-01 10:35:42 -05:00
parent 51895e9889
commit 11bcab7464
5 changed files with 14 additions and 7 deletions

View file

@ -71,5 +71,6 @@
'pages/socketio',
'pages/sphinx',
'pages/underscore',
'pages/vue',
'pages/yard',
'pages/yii';

View file

@ -71,5 +71,6 @@
'pages/socketio',
'pages/sphinx',
'pages/underscore',
'pages/vue',
'pages/yard',
'pages/yii';

View file

@ -6,7 +6,7 @@ module Docs
at_css('h1').content = 'Vue.js' if root_page?
css('#demo').remove
css('.demo', '.guide-links', '.footer').remove
# Remove code highlighting
css('figure').each do |node|

View file

@ -2,7 +2,7 @@ module Docs
class Vue
class EntriesFilter < Docs::EntriesFilter
def get_name
at_css('h1').content
at_css('h1').content.presence || 'API'
end
def get_type
@ -15,11 +15,16 @@ module Docs
def additional_entries
return [] if slug.start_with?('guide')
type = nil
css('h3').map do |node|
name = node.content.strip
name.sub! %r{\(.*\)}, '()'
[name, node['id'], "API: #{self.name}"]
css('h2, h3').each_with_object [] do |node, entries|
if node.name == 'h2'
type = node.content.strip
else
name = node.content.strip
name.sub! %r{\(.*\)}, '()'
entries << [name, node['id'], "API: #{type}"]
end
end
end
end

View file

@ -3,7 +3,7 @@ module Docs
self.name = 'Vue.js'
self.slug = 'vue'
self.type = 'vue'
self.version = '0.12.14'
self.version = '1.0.4'
self.base_url = 'http://vuejs.org'
self.root_path = '/guide/index.html'
self.initial_paths = %w(/api/index.html)