Skip to content

Commit 7c241ea

Browse files
committed
docs(en): merging all conflicts
2 parents 2973462 + 0fd7d2e commit 7c241ea

File tree

105 files changed

+9831
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+9831
-235
lines changed

.vitepress/buildEnd.config.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Feed } from 'feed'
44
import type { SiteConfig } from 'vitepress'
55
import { createContentLoader } from 'vitepress'
66

7-
const siteUrl = 'https://vitejs.dev'
7+
const siteUrl = 'https://vite.dev'
88
const blogUrl = `${siteUrl}/blog`
99

1010
export const buildEnd = async (config: SiteConfig): Promise<void> => {
@@ -14,9 +14,9 @@ export const buildEnd = async (config: SiteConfig): Promise<void> => {
1414
id: blogUrl,
1515
link: blogUrl,
1616
language: 'en',
17-
image: 'https://vitejs.dev/og-image.png',
18-
favicon: 'https://vitejs.dev/logo.svg',
19-
copyright: 'Copyright © 2019-present Evan You & Vite Contributors',
17+
image: 'https://vite.dev/og-image.png',
18+
favicon: 'https://vite.dev/logo.svg',
19+
copyright: 'Copyright © 2019-present VoidZero Inc. & Vite Contributors',
2020
})
2121

2222
const posts = await createContentLoader('blog/*.md', {

.vitepress/config.ts

+121-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import type { DefaultTheme } from 'vitepress'
22
import { defineConfig } from 'vitepress'
33
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
4+
import {
5+
groupIconMdPlugin,
6+
groupIconVitePlugin,
7+
} from 'vitepress-plugin-group-icons'
48
import { buildEnd } from './buildEnd.config'
59

610
const ogDescription = 'Next Generation Frontend Tooling'
7-
const ogImage = 'https://vitejs.dev/og-image.png'
11+
const ogImage = 'https://vite.dev/og-image.jpg'
812
const ogTitle = 'Vite'
9-
const ogUrl = 'https://vitejs.dev'
13+
const ogUrl = 'https://vite.dev'
1014

1115
// netlify envs
1216
const deployURL = process.env.DEPLOY_PRIME_URL || ''
@@ -36,15 +40,15 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
3640
const oldVersions: DefaultTheme.NavItemWithLink[] = [
3741
{
3842
text: 'Vite 4 Docs',
39-
link: 'https://v4.vitejs.dev',
43+
link: 'https://v4.vite.dev',
4044
},
4145
{
4246
text: 'Vite 3 Docs',
43-
link: 'https://v3.vitejs.dev',
47+
link: 'https://v3.vite.dev',
4448
},
4549
{
4650
text: 'Vite 2 Docs',
47-
link: 'https://v2.vitejs.dev',
51+
link: 'https://v2.vite.dev',
4852
},
4953
]
5054

@@ -54,7 +58,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
5458
return [
5559
{
5660
text: 'Vite 5 Docs (release)',
57-
link: 'https://vitejs.dev',
61+
link: 'https://vite.dev',
5862
},
5963
...oldVersions,
6064
]
@@ -74,6 +78,30 @@ export default defineConfig({
7478
'link',
7579
{ rel: 'alternate', type: 'application/rss+xml', href: '/blog.rss' },
7680
],
81+
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
82+
[
83+
'link',
84+
{
85+
rel: 'preconnect',
86+
href: 'https://fonts.gstatic.com',
87+
crossorigin: 'true',
88+
},
89+
],
90+
[
91+
'link',
92+
{
93+
rel: 'preload',
94+
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600&family=IBM+Plex+Mono:wght@400&display=swap',
95+
as: 'style',
96+
},
97+
],
98+
[
99+
'link',
100+
{
101+
rel: 'stylesheet',
102+
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600&family=IBM+Plex+Mono:wght@400&display=swap',
103+
},
104+
],
77105
['link', { rel: 'me', href: 'https://m.webtoo.ls/@vite' }],
78106
['meta', { property: 'og:type', content: 'website' }],
79107
['meta', { property: 'og:title', content: ogTitle }],
@@ -96,13 +124,23 @@ export default defineConfig({
96124
],
97125

98126
locales: {
127+
<<<<<<< HEAD
99128
root: { label: '简体中文' },
100129
en: { label: 'English', link: 'https://vitejs.dev' },
101130
ja: { label: '日本語', link: 'https://ja.vitejs.dev' },
102131
es: { label: 'Español', link: 'https://es.vitejs.dev' },
103132
pt: { label: 'Português', link: 'https://pt.vitejs.dev' },
104133
ko: { label: '한국어', link: 'https://ko.vitejs.dev' },
105134
de: { label: 'Deutsch', link: 'https://de.vitejs.dev' },
135+
=======
136+
root: { label: 'English' },
137+
zh: { label: '简体中文', link: 'https://cn.vite.dev' },
138+
ja: { label: '日本語', link: 'https://ja.vite.dev' },
139+
es: { label: 'Español', link: 'https://es.vite.dev' },
140+
pt: { label: 'Português', link: 'https://pt.vite.dev' },
141+
ko: { label: '한국어', link: 'https://ko.vite.dev' },
142+
de: { label: 'Deutsch', link: 'https://de.vite.dev' },
143+
>>>>>>> 0fd7d2e8b36cf55fe5385ff2f957b92e9d44054b
106144
},
107145

108146
themeConfig: {
@@ -121,13 +159,13 @@ export default defineConfig({
121159
socialLinks: [
122160
{ icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@vite' },
123161
{ icon: 'twitter', link: 'https://twitter.com/vite_js' },
124-
{ icon: 'discord', link: 'https://chat.vitejs.dev' },
162+
{ icon: 'discord', link: 'https://chat.vite.dev' },
125163
{ icon: 'github', link: 'https://github.com/vitejs/vite' },
126164
],
127165

128166
algolia: {
129167
appId: '7H67QR5P0A',
130-
apiKey: 'deaab78bcdfe96b599497d25acc6460e',
168+
apiKey: '208bb9c14574939326032b937431014b',
131169
indexName: 'vitejs',
132170
searchParameters: {
133171
facetFilters: ['tags:cn']
@@ -180,8 +218,12 @@ export default defineConfig({
180218

181219
footer: {
182220
message: `Released under the MIT License. (${commitRef})`,
221+
<<<<<<< HEAD
183222
copyright:
184223
'本中文文档内容版权为 Vite 官方中文翻译团队所有,保留所有权利。'
224+
=======
225+
copyright: 'Copyright © 2019-present VoidZero Inc. & Vite Contributors',
226+
>>>>>>> 0fd7d2e8b36cf55fe5385ff2f957b92e9d44054b
185227
},
186228

187229
nav: [
@@ -205,8 +247,13 @@ export default defineConfig({
205247
link: 'https://twitter.com/vite_js',
206248
},
207249
{
250+
<<<<<<< HEAD
208251
text: 'Discord 聊天室',
209252
link: 'https://chat.vitejs.dev'
253+
=======
254+
text: 'Discord Chat',
255+
link: 'https://chat.vite.dev',
256+
>>>>>>> 0fd7d2e8b36cf55fe5385ff2f957b92e9d44054b
210257
},
211258
{
212259
text: 'Awesome Vite',
@@ -321,8 +368,17 @@ export default defineConfig({
321368
link: '/guide/philosophy',
322369
},
323370
{
371+
<<<<<<< HEAD
324372
text: '从 v4 迁移',
325373
link: '/guide/migration'
374+
=======
375+
text: 'Migration from v5',
376+
link: '/guide/migration',
377+
>>>>>>> 0fd7d2e8b36cf55fe5385ff2f957b92e9d44054b
378+
},
379+
{
380+
text: 'Breaking Changes',
381+
link: '/changes/',
326382
},
327383
],
328384
},
@@ -342,8 +398,13 @@ export default defineConfig({
342398
link: '/guide/api-javascript',
343399
},
344400
{
401+
<<<<<<< HEAD
345402
text: 'Vite 运行时 API',
346403
link: '/guide/api-vite-runtime',
404+
=======
405+
text: 'Environment API',
406+
link: '/guide/api-environment',
407+
>>>>>>> 0fd7d2e8b36cf55fe5385ff2f957b92e9d44054b
347408
},
348409
{
349410
text: '配置参考',
@@ -391,6 +452,45 @@ export default defineConfig({
391452
],
392453
},
393454
],
455+
'/changes/': [
456+
{
457+
text: 'Breaking Changes',
458+
link: '/changes/',
459+
},
460+
{
461+
text: 'Current',
462+
items: [],
463+
},
464+
{
465+
text: 'Future',
466+
items: [
467+
{
468+
text: 'this.environment in Hooks',
469+
link: '/changes/this-environment-in-hooks',
470+
},
471+
{
472+
text: 'HMR hotUpdate Plugin Hook',
473+
link: '/changes/hotupdate-hook',
474+
},
475+
{
476+
text: 'Move to per-environment APIs',
477+
link: '/changes/per-environment-apis',
478+
},
479+
{
480+
text: 'SSR using ModuleRunner API',
481+
link: '/changes/ssr-using-modulerunner',
482+
},
483+
{
484+
text: 'Shared plugins during build',
485+
link: '/changes/shared-plugins-during-build',
486+
},
487+
],
488+
},
489+
{
490+
text: 'Past',
491+
items: [],
492+
},
493+
],
394494
},
395495
},
396496
transformPageData(pageData) {
@@ -406,6 +506,19 @@ export default defineConfig({
406506
},
407507
markdown: {
408508
codeTransformers: [transformerTwoslash()],
509+
config(md) {
510+
md.use(groupIconMdPlugin)
511+
},
512+
},
513+
vite: {
514+
plugins: [
515+
groupIconVitePlugin({
516+
customIcon: {
517+
firebase: 'vscode-icons:file-type-firebase',
518+
'.gitlab-ci.yml': 'vscode-icons:file-type-gitlab',
519+
},
520+
}),
521+
],
409522
},
410523
buildEnd,
411524
})

.vitepress/theme/components/AsideSponsors.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sponsors = computed(() => {
2323
href="https://viteconf.org/?utm=vite-sidebar"
2424
target="_blank"
2525
>
26-
<img width="22" height="22" src="/viteconf.svg" />
26+
<img width="22" height="22" src="/viteconf.svg" alt="ViteConf Logo" />
2727
<span>
2828
<p class="extra-info">Building Together</p>
2929
<p class="heading">ViteConf 24 - Oct 3</p>

.vitepress/theme/components/BlogIndex.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { data as posts } from './blog.data'
2+
import { data as posts } from '../../../_data/blog.data'
33
44
function getDateTime(time: number) {
55
return new Date(time).toISOString()

.vitepress/theme/components/HomeSponsors.vue

-70
This file was deleted.

0 commit comments

Comments
 (0)