Skip to content

Commit 8975e9c

Browse files
committed
Add Vite documentation
https://vitejs.dev/
1 parent ae91426 commit 8975e9c

File tree

7 files changed

+46
-1
lines changed

7 files changed

+46
-1
lines changed

assets/javascripts/news.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
[
2+
[
3+
"2021-12-04",
4+
"New documentation: <a href=\"/vite/\">Vite</a>"
5+
],
26
[
37
"2021-11-29",
48
"New documentation: <a href=\"/i3/\">i3</a>"

assets/javascripts/templates/pages/about_tmpl.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,11 @@ credits = [
851851
'2010-2018 Mitchell Hashimoto',
852852
'MPL',
853853
'https://raw.githubusercontent.com/mitchellh/vagrant/master/website/LICENSE.md'
854+
], [
855+
'Vite',
856+
'2019–present, Yuxi (Evan) You and Vite contributors',
857+
'MIT',
858+
'https://github.com/vitejs/vite/blob/main/LICENSE'
854859
], [
855860
'Vue Router',
856861
'2013-present Evan You',

lib/docs/filters/vue/clean_html.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ module Docs
22
class Vue
33
class CleanHtmlFilter < Filter
44
def call
5-
@doc = at_css(version == '3' ? 'main' : '.content')
5+
if current_url.host == 'vitejs.dev'
6+
return '<h1>Vite</h1>' if root_page?
7+
@doc = at_css('.content > div')
8+
else
9+
@doc = at_css(version == '3' ? 'main' : '.content')
10+
end
611

712
at_css('h1').content = 'Vue.js' if root_page?
813
doc.child.before('<h1>Vue.js API</h1>') if slug == 'api/' || slug == 'api/index'

lib/docs/scrapers/vite.rb

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module Docs
2+
class Vite < UrlScraper
3+
self.name = 'Vite'
4+
self.slug = 'vite'
5+
self.type = 'simple'
6+
self.links = {
7+
home: 'https://vitejs.dev/',
8+
code: 'https://github.com/vitejs/vite'
9+
}
10+
11+
options[:container] = 'main'
12+
options[:root_title] = 'Vite'
13+
14+
options[:attribution] = <<-HTML
15+
&copy; 2019–present, Yuxi (Evan) You and Vite contributors<br>
16+
Licensed under the MIT License.
17+
HTML
18+
19+
version do
20+
self.release = '2.6.14'
21+
self.base_url = 'https://vitejs.dev/'
22+
self.initial_paths = %w(guide/)
23+
html_filters.push 'vue/entries_v3', 'vue/clean_html'
24+
end
25+
26+
def get_latest_version(opts)
27+
get_npm_version('vite', opts)
28+
end
29+
end
30+
end

public/icons/docs/vite/16.png

703 Bytes
Loading
1.34 KB
Loading

public/icons/docs/vite/SOURCE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://vitejs.dev/logo.svg

0 commit comments

Comments
 (0)