Unified · Split
| @@ -9,10 +9,9 @@ module Docs · 8 unmodified lines | ||
| 9 | 9 | end |
| 10 | 10 | |
| 11 | 11 | def get_type |
| 12 | − name = at_css('h1').content | |
| 13 | − name.sub! %r{\s*#\s*}, '' | |
| 14 | − name.sub! %r{\s*\u200B\s*}, '' | |
| 15 | − name | |
| 12 | + return 'browser' if slug.starts_with?('guide/browser') | |
| 13 | + return 'cli' if slug.starts_with?('guide/cli') | |
| 14 | + return slug.split('/').first | |
| 16 | 15 | end |
| 17 | 16 | |
| 18 | 17 | def additional_entries |
| @@ -10,6 +10,7 @@ module Docs · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | options[:root_title] = 'Vitest' |
| 12 | 12 | options[:download_images] = false |
| 13 | + options[:skip] = %w(blog) | |
| 13 | 14 | |
| 14 | 15 | options[:attribution] = <<-HTML |
| 15 | 16 | © 2021-Present Anthony Fu<br> |
| @@ -17,10 +18,18 @@ module Docs · 1 unmodified line | ||
| 17 | 18 | Licensed under the MIT License. |
| 18 | 19 | HTML |
| 19 | 20 | |
| 20 | − self.release = '2.0.3' | |
| 21 | − self.base_url = 'https://vitest.dev/' | |
| 22 | 21 | self.initial_paths = %w(guide/) |
| 23 | 22 | html_filters.push 'vitest/entries', 'vite/clean_html' |
| 23 | + | |
| 24 | + version do | |
| 25 | + self.release = '3.0.8' | |
| 26 | + self.base_url = 'https://vitest.dev/' | |
| 27 | + end | |
| 28 | + | |
| 29 | + version '2' do | |
| 30 | + self.release = '2.1.9' | |
| 31 | + self.base_url = 'https://v2.vitest.dev/' | |
| 32 | + end | |
| 24 | 33 | |
| 25 | 34 | def get_latest_version(opts) |
| 26 | 35 | get_npm_version('vitest', opts) |