Fixes #2004.
Unified · Split
| @@ -2,13 +2,8 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Vue |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | 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') | |
| 12 | 7 | |
| 13 | 8 | at_css('h1').content = 'Vue.js' if root_page? |
| 14 | 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 | 29 | self.release = '2.7.14' |
| 30 | 30 | self.base_url = 'https://v2.vuejs.org/v2/' |
| 31 | 31 | self.initial_paths = %w(api/) |
| 32 | + self.root_path = 'guide/' | |
| 32 | 33 | html_filters.push 'vue/entries', 'vue/clean_html' |
| 33 | 34 | end |
| 34 | 35 | |