History

Update Vue documentation

Fixes #2004.

Simon Legner committed 3 years ago

Commit 61009121 parent 03dfcf52 files · +3 −7Browse files

Unified · Split

2 files
  1. lib/docs/filters/vue/clean_html.rb +2 −7
  2. lib/docs/scrapers/vue.rb +1 −0
lib/docs/filters/vue/clean_html.rb+2−7
@@ -2,13 +2,8 @@ module Docs · 1 unmodified line
22 class Vue
33 class CleanHtmlFilter < Filter
44 def call
5− if current_url.host == 'vitejs.dev'
6− return '<h1>Vite</h1>' if root_page?
7− @doc = at_css('.content > div')
8− else
9− return '<h1>Vue.js</h1>' if root_page?
10− @doc = at_css(version == '3' ? 'main > div > div' : '.content')
11− end
5+ return '<h1>Vue.js</h1>' if root_page?
6+ @doc = at_css(version == '3' ? 'main > div > div' : '.content')
127
138 at_css('h1').content = 'Vue.js' if root_page?
149 doc.child.before('<h1>Vue.js API</h1>') if slug == 'api/' || slug == 'api/index'
lib/docs/scrapers/vue.rb+1−0
@@ -29,6 +29,7 @@ module Docs · 28 unmodified lines
2929 self.release = '2.7.14'
3030 self.base_url = 'https://v2.vuejs.org/v2/'
3131 self.initial_paths = %w(api/)
32+ self.root_path = 'guide/'
3233 html_filters.push 'vue/entries', 'vue/clean_html'
3334 end
3435