Update Vue.js documentation (2.3.2)

Closes #612.
pull/621/merge
Thibaut Courouble 8 years ago
parent 8e61265dcb
commit 0e8ab3c5c5

@ -5,7 +5,11 @@ module Docs
if slug == 'api/' if slug == 'api/'
'API' 'API'
else else
at_css('h1').content name = at_css('.content h1').content
node = at_css(".sidebar .menu-root a[href='#{File.basename(slug)}']")
index = node.parent.parent.css('> li > a').to_a.index(node)
name.prepend "#{index + 1}. " if index
name
end end
end end
@ -21,7 +25,7 @@ module Docs
return [] if slug.start_with?('guide') return [] if slug.start_with?('guide')
type = nil type = nil
css('h2, h3').each_with_object [] do |node, entries| css('.content h2, .content h3').each_with_object [] do |node, entries|
if node.name == 'h2' if node.name == 'h2'
type = node.content.strip type = node.content.strip
else else

@ -8,9 +8,10 @@ module Docs
code: 'https://github.com/vuejs/vue' code: 'https://github.com/vuejs/vue'
} }
html_filters.push 'vue/clean_html', 'vue/entries' html_filters.push 'vue/entries', 'vue/clean_html'
options[:only_patterns] = [/guide\//, /api\//] options[:only_patterns] = [/guide\//, /api\//]
options[:replace_paths] = { 'guide/' => 'guide/index.html' }
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2013&ndash;2017 Evan You, Vue.js contributors<br> &copy; 2013&ndash;2017 Evan You, Vue.js contributors<br>
@ -18,7 +19,7 @@ module Docs
HTML HTML
version '2' do version '2' do
self.release = '2.2.6' self.release = '2.3.2'
self.base_url = 'https://vuejs.org/v2/' self.base_url = 'https://vuejs.org/v2/'
self.root_path = 'guide/index.html' self.root_path = 'guide/index.html'
self.initial_paths = %w(api/) self.initial_paths = %w(api/)

Loading…
Cancel
Save