Fixes #2004.
Unified · Split
| @@ -2,13 +2,8 @@ module Docs · 1 unmodified line | |||
| 2 | class Vue | 2 | class Vue |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | if current_url.host == 'vitejs.dev' | 5 | return '<h1>Vue.js</h1>' if root_page? |
| 6 | return '<h1>Vite</h1>' if root_page? | 6 | @doc = at_css(version == '3' ? 'main > div > div' : '.content') |
| 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 | ||
| 12 | 7 | ||
| 13 | at_css('h1').content = 'Vue.js' if root_page? | 8 | at_css('h1').content = 'Vue.js' if root_page? |
| 14 | doc.child.before('<h1>Vue.js API</h1>') if slug == 'api/' || slug == 'api/index' | 9 | doc.child.before('<h1>Vue.js API</h1>') if slug == 'api/' || slug == 'api/index' |
| @@ -29,6 +29,7 @@ module Docs · 28 unmodified lines | |||
| 29 | self.release = '2.7.14' | 29 | self.release = '2.7.14' |
| 30 | self.base_url = 'https://v2.vuejs.org/v2/' | 30 | self.base_url = 'https://v2.vuejs.org/v2/' |
| 31 | self.initial_paths = %w(api/) | 31 | self.initial_paths = %w(api/) |
| 32 | self.root_path = 'guide/' | ||
| 32 | html_filters.push 'vue/entries', 'vue/clean_html' | 33 | html_filters.push 'vue/entries', 'vue/clean_html' |
| 33 | end | 34 | end |
| 34 | 35 | ||