Update Vue documentation

Fixes #2004.
pull/2020/head
Simon Legner 2 years ago
parent 03dfcf56ef
commit 6100912e46

@ -2,13 +2,8 @@ module Docs
class Vue
class CleanHtmlFilter < Filter
def call
if current_url.host == 'vitejs.dev'
return '<h1>Vite</h1>' if root_page?
@doc = at_css('.content > div')
else
return '<h1>Vue.js</h1>' if root_page?
@doc = at_css(version == '3' ? 'main > div > div' : '.content')
end
at_css('h1').content = 'Vue.js' if root_page?
doc.child.before('<h1>Vue.js API</h1>') if slug == 'api/' || slug == 'api/index'

@ -29,6 +29,7 @@ module Docs
self.release = '2.7.14'
self.base_url = 'https://v2.vuejs.org/v2/'
self.initial_paths = %w(api/)
self.root_path = 'guide/'
html_filters.push 'vue/entries', 'vue/clean_html'
end

Loading…
Cancel
Save