Add Vite documentation

https://vitejs.dev/
pull/1670/head
Simon Legner 3 years ago
parent ae9142657b
commit 8975e9c738

@ -1,4 +1,8 @@
[
[
"2021-12-04",
"New documentation: <a href=\"/vite/\">Vite</a>"
],
[
"2021-11-29",
"New documentation: <a href=\"/i3/\">i3</a>"

@ -851,6 +851,11 @@ credits = [
'2010-2018 Mitchell Hashimoto',
'MPL',
'https://raw.githubusercontent.com/mitchellh/vagrant/master/website/LICENSE.md'
], [
'Vite',
'2019present, Yuxi (Evan) You and Vite contributors',
'MIT',
'https://github.com/vitejs/vite/blob/main/LICENSE'
], [
'Vue Router',
'2013-present Evan You',

@ -2,7 +2,12 @@ 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
@doc = at_css(version == '3' ? 'main' : '.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'

@ -0,0 +1,30 @@
module Docs
class Vite < UrlScraper
self.name = 'Vite'
self.slug = 'vite'
self.type = 'simple'
self.links = {
home: 'https://vitejs.dev/',
code: 'https://github.com/vitejs/vite'
}
options[:container] = 'main'
options[:root_title] = 'Vite'
options[:attribution] = <<-HTML
&copy; 2019present, Yuxi (Evan) You and Vite contributors<br>
Licensed under the MIT License.
HTML
version do
self.release = '2.6.14'
self.base_url = 'https://vitejs.dev/'
self.initial_paths = %w(guide/)
html_filters.push 'vue/entries_v3', 'vue/clean_html'
end
def get_latest_version(opts)
get_npm_version('vite', opts)
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1 @@
https://vitejs.dev/logo.svg
Loading…
Cancel
Save