Skip to content

Commit

Permalink
docs(en): merging all conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
docschina-bot committed Apr 8, 2024
2 parents 7feeaa2 + 69e1142 commit 06af22b
Show file tree
Hide file tree
Showing 119 changed files with 9,691 additions and 5,043 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
.vitepress/@slidev
.vitepress/cache
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
228 changes: 184 additions & 44 deletions .vitepress/config.js → .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// @ts-check
import type { DefaultTheme } from 'vitepress'
import { defineConfig } from 'vitepress'
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'

const Guide = [
const CURRENT_VERSION = '0.48.0-beta.22'

const Guide: DefaultTheme.NavItemWithLink[] = [
{
text: 'Tại sao chọn Slidev',
link: '/guide/why',
Expand Down Expand Up @@ -46,10 +50,14 @@ const Guide = [
link: '/guide/presenter-mode',
},
{
<<<<<<< HEAD:.vitepress/config.js
<<<<<<< HEAD
text: 'Tích hợp trình soạn thảo',
=======
text: 'Drawing & Annonations',
=======
text: 'Drawing & Annotations',
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
link: '/guide/drawing',
},
{
Expand All @@ -63,7 +71,18 @@ const Guide = [
},
]

const Theme = [
const BuiltIn: DefaultTheme.NavItemWithLink[] = [
{
text: 'Components',
link: '/builtin/components',
},
{
text: 'Layouts',
link: '/builtin/layouts',
},
]

const Theme: (DefaultTheme.NavItemWithLink | DefaultTheme.NavItemChildren)[] = [
{
text: 'Sử dụng chủ đề',
link: '/themes/use',
Expand All @@ -78,49 +97,26 @@ const Theme = [
},
]

const Translations = [
const Addon: DefaultTheme.NavItemWithLink[] = [
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Việt Nam'
},
{
text: 'English',
link: 'https://sli.dev{{pathname}}',
=======
text: 'Use Addon',
link: '/addons/use',
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
},
{
text: '简体中文',
link: 'https://cn.sli.dev{{pathname}}',
},
{
text: 'Français',
link: 'https://fr.sli.dev{{pathname}}',
},
{
text: 'Español',
link: 'https://es.sli.dev{{pathname}}',
},
{
text: 'Русский',
link: 'https://ru.sli.dev{{pathname}}',
},
{
text: 'Việt Nam',
link: 'https://vn.sli.dev{{pathname}}',
},
{
text: 'Deutsch',
link: 'https://de.sli.dev{{pathname}}',
},
{
text: 'Português (BR)',
link: 'https://br.sli.dev{{pathname}}',
},
{
text: 'Ελληνικά',
link: 'https://el.sli.dev{{pathname}}',
text: 'Write an Addon',
link: '/addons/write-an-addon',
},
]

const Customizations = [
const Customizations: (DefaultTheme.NavItemWithLink | DefaultTheme.NavItemChildren)[] = [
{
text: 'Tùy chỉnh',
link: '/custom/',
Expand All @@ -146,8 +142,13 @@ const Customizations = [
link: '/custom/config-vite',
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Cấu hình Windi CSS',
link: '/custom/config-windicss',
=======
text: 'Configure UnoCSS',
link: '/custom/config-unocss',
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
},
{
text: 'Cấu hình Monaco',
Expand All @@ -162,7 +163,15 @@ const Customizations = [
link: '/custom/config-mermaid',
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Cấu hình Phím tắt',
=======
text: 'Configure Parser',
link: '/custom/config-parser',
},
{
text: 'Configure Shortcuts',
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
link: '/custom/config-shortcuts',
},
{
Expand All @@ -172,10 +181,10 @@ const Customizations = [
{
text: 'Global Layers',
link: '/custom/global-layers',
}
},
]

const Resources = [
const Resources: DefaultTheme.NavItemWithLink[] = [
{
text: 'Showcases',
link: '/showcases',
Expand All @@ -194,8 +203,9 @@ const Resources = [
},
]

const slidebars = [
const slidebars: DefaultTheme.SidebarItem[] = [
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Hướng dẫn',
children: Guide,
},
Expand All @@ -219,13 +229,34 @@ const slidebars = [
link: '/builtin/layouts',
},
],
=======
text: 'Guide',
items: Guide,
},
{
text: 'Themes',
items: Theme,
},
{
text: 'Addons',
items: Addon,
},
{
text: 'Customizations',
items: Customizations,
},
{
text: 'Built-in',
items: BuiltIn,
},
{
text: 'Resources',
items: Resources,
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
},
]

/**
* @type {import('vitepress').UserConfig}
*/
module.exports = {
export default defineConfig({
title: 'Slidev',
description: 'Trang trình bày dành cho nhà lập trình',
head: [
Expand All @@ -241,9 +272,27 @@ module.exports = {
['link', { rel: 'preconnect', crossorigin: 'anonymous', href: 'https://fonts.gstatic.com' }],
['link', { href: 'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@200;400;500&family=Inter:wght@200;400;500;600', rel: 'stylesheet' }],
],
markdown: {
theme: {
light: 'vitesse-light',
dark: 'vitesse-dark',
},
async shikiSetup(shiki) {
await shiki.loadLanguage(
'html',
'xml',
'vue',
'markdown',
)
},
codeTransformers: [
transformerTwoslash(),
],
},
cleanUrls: true,
themeConfig: {
repo: 'slidevjs/docs',
logo: '/logo.svg',
<<<<<<< HEAD:.vitepress/config.js
docsBranch: 'main',
editLinks: true,
editLinkText: 'Đề xuất các thay đổi cho trang này',
Expand All @@ -255,6 +304,15 @@ module.exports = {
// for translations maintainers: change the filter to your locale code (subdomain name)
facetFilters: ['language:vn']
}
=======
editLink: {
pattern: 'https://github.com/slidevjs/docs/edit/main/:path',
text: 'Suggest changes to this page',
},

search: {
provider: 'local',
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
},

nav: [
Expand All @@ -263,30 +321,112 @@ module.exports = {
items: Guide,
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Chủ đề',
items: Theme,
},
{
text: 'Tùy chỉnh',
items: Customizations,
=======
text: 'Theme',
items: [
...Theme,
{
text: 'Built-in',
items: BuiltIn,
},
],
},
{
text: 'Customize',
items: [
...Customizations,
{
text: 'Addon',
items: Addon,
},
],
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
},
{
text: 'Tài nguyên',
items: Resources,
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Việt Nam',
items: Translations,
=======
text: `v${CURRENT_VERSION}`,
items: [
{ text: 'Release Notes', link: 'https://github.com/slidevjs/slidev/releases' },
],
>>>>>>> 69e1142c6f07cb04fb7fea7f396de60cd1f0538f:.vitepress/config.ts
},
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/slidevjs/slidev' },
{ icon: 'twitter', link: 'https://twitter.com/slidevjs' },
{ icon: 'discord', link: 'https://chat.sli.dev' },
],

sidebar: {
'/guide/': slidebars,
'/themes/': slidebars,
'/addons/': slidebars,
'/custom/': slidebars,
'/builtin/': slidebars,
'/resources/': slidebars,
'/': slidebars,
},

footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2020 Anthony Fu.',
},
},

locales: {
root: {
label: 'English',
},
zh: {
label: '简体中文',
link: 'https://cn.sli.dev/',
},
fr: {
label: 'Français',
link: 'https://fr.sli.dev/',
},
es: {
label: 'Español',
link: 'https://es.sli.dev/',
},
ru: {
label: 'Русский',
link: 'https://ru.sli.dev/',
},
vn: {
label: 'Việt Nam',
link: 'https://vn.sli.dev/',
},
de: {
label: 'Deutsch',
link: 'https://de.sli.dev/',
},
br: {
label: 'Português (BR)',
link: 'https://br.sli.dev/',
},
el: {
label: 'Ελληνικά',
link: 'https://el.sli.dev/',
},
ja: {
label: '日本語',
link: 'https://ja.sli.dev/',
},
},
}
})
8 changes: 4 additions & 4 deletions .vitepress/scripts/prepare.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const fs = require('fs-extra')
import { copy, remove } from 'fs-extra'

async function main(){
await fs.remove('.vitepress/@slidev')
await fs.copy('node_modules/@slidev', '.vitepress/@slidev', { dereference: true })
async function main() {
await remove('.vitepress/@slidev')
await copy('node_modules/@slidev', '.vitepress/@slidev', { dereference: true })
}

main()

0 comments on commit 06af22b

Please sign in to comment.