Merge pull request #1052 from gengjiawen/patch-2

bump vue to 2.6.10
pull/1066/head
Jasper van Merle 6 years ago
commit 3b175c716b

@ -758,9 +758,9 @@ credits = [
'https://raw.githubusercontent.com/vuejs/vue-router/dev/LICENSE' 'https://raw.githubusercontent.com/vuejs/vue-router/dev/LICENSE'
], [ ], [
'Vue.js', 'Vue.js',
'2013-2018 Evan You, Vue.js contributors', '2013-present Yuxi Evan You',
'MIT', 'MIT',
'https://raw.githubusercontent.com/vuejs/vue/master/LICENSE' 'https://raw.githubusercontent.com/vuejs/vuejs.org/master/LICENSE'
], [ ], [
'Vuex', 'Vuex',
'2015-present Evan You', '2015-present Evan You',

@ -16,10 +16,19 @@ module Docs
node['data-language'] = node['class'][/highlight (\w+)/, 1] node['data-language'] = node['class'][/highlight (\w+)/, 1]
end end
css('pre').each do |node|
node.content = node.content.strip
node['data-language'] = 'javascript'
end
css('iframe').each do |node| css('iframe').each do |node|
node['sandbox'] = 'allow-forms allow-scripts allow-same-origin' node['sandbox'] = 'allow-forms allow-scripts allow-same-origin'
end end
css('details').each do |node|
node.name = 'div'
end
doc doc
end end
end end

@ -2,11 +2,16 @@ module Docs
class Vue class Vue
class EntriesFilter < Docs::EntriesFilter class EntriesFilter < Docs::EntriesFilter
def get_name def get_name
if slug == 'api/' if slug == 'api/' || slug == 'api/index'
'API' 'API'
elsif slug == 'style-guide/'
'Style Guide'
else else
name = at_css('.content h1').content name = at_css('.content h1').content
node = at_css(".sidebar .menu-root a[href='#{File.basename(slug)}']") node = at_css(".sidebar .menu-root a[href='#{File.basename(slug)}']")
return name if node.nil?
index = node.parent.parent.css('> li > a').to_a.index(node) index = node.parent.parent.css('> li > a').to_a.index(node)
name.prepend "#{index + 1}. " if index name.prepend "#{index + 1}. " if index
name name
@ -16,6 +21,8 @@ module Docs
def get_type def get_type
if slug.start_with?('guide') if slug.start_with?('guide')
'Guide' 'Guide'
elsif slug == 'style-guide/'
'Style Guide'
else else
'API' 'API'
end end
@ -31,7 +38,15 @@ module Docs
else else
name = node.content.strip name = node.content.strip
name.sub! %r{\(.*\)}, '()' name.sub! %r{\(.*\)}, '()'
entries << [name, node['id'], "API: #{type}"] name.sub! /(essential|strongly recommended|recommended|use with caution)\Z/, ''
current_type = "API: #{type}"
if slug == 'style-guide/'
current_type = "Style Guide: "
current_type += type.sub(/( Rules: )/, ': ').split('(')[0]
end
entries << [name, node['id'], current_type]
end end
end end
end end

@ -15,12 +15,12 @@ module Docs
options[:replace_paths] = { 'guide/' => 'guide/index.html' } options[:replace_paths] = { 'guide/' => 'guide/index.html' }
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2013&ndash;2018 Evan You, Vue.js contributors<br> &copy; 2013&ndash;present Yuxi Evan You<br>
Licensed under the MIT License. Licensed under the MIT License.
HTML HTML
version '2' do version '2' do
self.release = '2.5.16' self.release = '2.6.10'
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