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 Feb 21, 2024
2 parents 99b09c6 + c3c1774 commit fde1939
Show file tree
Hide file tree
Showing 114 changed files with 9,300 additions and 4,831 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
192 changes: 178 additions & 14 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.2'

const Guide: DefaultTheme.NavItemWithLink[] = [
{
text: 'Por que Slidev',
link: '/guide/why',
Expand Down Expand Up @@ -55,7 +59,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: 'Usar um Tema',
link: '/themes/use',
Expand All @@ -70,8 +85,9 @@ const Theme = [
},
]

const Translations = [
const Addon: DefaultTheme.NavItemWithLink[] = [
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Português (BR)',
},
{
Expand Down Expand Up @@ -105,10 +121,18 @@ const Translations = [
{
text: 'Ελληνικά',
link: 'https://el.sli.dev{{pathname}}',
=======
text: 'Use Addon',
link: '/addons/use',
},
{
text: 'Write an Addon',
link: '/addons/write-an-addon',
>>>>>>> c3c1774bdf48295664f5b30d7ba7bfbda5a0f3d2:.vitepress/config.ts
},
]

const Customizations = [
const Customizations: (DefaultTheme.NavItemWithLink | DefaultTheme.NavItemChildren)[] = [
{
text: 'Customizações',
link: '/custom/',
Expand All @@ -134,8 +158,13 @@ const Customizations = [
link: '/custom/config-vite',
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Configurar Windi CSS',
link: '/custom/config-windicss',
=======
text: 'Configure UnoCSS',
link: '/custom/config-unocss',
>>>>>>> c3c1774bdf48295664f5b30d7ba7bfbda5a0f3d2:.vitepress/config.ts
},
{
text: 'Configurar Monaco',
Expand All @@ -150,7 +179,15 @@ const Customizations = [
link: '/custom/config-mermaid',
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Configurar Atalhos',
=======
text: 'Configure Parser',
link: '/custom/config-parser',
},
{
text: 'Configure Shortcuts',
>>>>>>> c3c1774bdf48295664f5b30d7ba7bfbda5a0f3d2:.vitepress/config.ts
link: '/custom/config-shortcuts',
},
{
Expand All @@ -160,10 +197,10 @@ const Customizations = [
{
text: 'Camadas Globais',
link: '/custom/global-layers',
}
},
]

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

const slidebars = [
const slidebars: DefaultTheme.SidebarItem[] = [
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Guia',
children: Guide,
},
Expand All @@ -203,13 +241,30 @@ 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,
>>>>>>> c3c1774bdf48295664f5b30d7ba7bfbda5a0f3d2:.vitepress/config.ts
},
]

/**
* @type {import('vitepress').UserConfig}
*/
module.exports = {
export default defineConfig({
title: 'Slidev',
description: 'Apresentação de slides para desenvolvedores',
head: [
Expand All @@ -225,9 +280,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: 'Sugerir mudanças à essa página',
Expand All @@ -239,6 +312,15 @@ module.exports = {
// for translations maintainers: change the filter to your locale code (subdomain name)
facetFilters: ['language:br']
}
=======
editLink: {
pattern: 'https://github.com/slidevjs/docs/edit/main/:path',
text: 'Suggest changes to this page',
},

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

nav: [
Expand All @@ -247,30 +329,112 @@ module.exports = {
items: Guide,
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Temas',
items: Theme,
},
{
text: 'Customizações',
items: Customizations,
=======
text: 'Theme',
items: [
...Theme,
{
text: 'Built-in',
items: BuiltIn,
},
],
},
{
text: 'Customize',
items: [
...Customizations,
{
text: 'Addon',
items: Addon,
},
],
>>>>>>> c3c1774bdf48295664f5b30d7ba7bfbda5a0f3d2:.vitepress/config.ts
},
{
text: 'Recursos',
items: Resources,
},
{
<<<<<<< HEAD:.vitepress/config.js
text: 'Português (BR)',
items: Translations,
=======
text: `v${CURRENT_VERSION}`,
items: [
{ text: 'Release Notes', link: 'https://github.com/slidevjs/slidev/releases' },
],
>>>>>>> c3c1774bdf48295664f5b30d7ba7bfbda5a0f3d2:.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()
Loading

0 comments on commit fde1939

Please sign in to comment.