mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2025-07-05 19:36:12 +08:00
feat: add locale
This commit is contained in:
@ -1,33 +0,0 @@
|
||||
import { fileURLToPath } from 'url'
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vitepress'
|
||||
import vueJsxPlugin from '@vitejs/plugin-vue-jsx'
|
||||
import { VitePluginVitepressDemo } from 'vite-plugin-vitepress-demo'
|
||||
import { getNav } from './config/nav'
|
||||
import { getSidebar } from './config/sidebar'
|
||||
import { getRewrites } from './config/rewrites'
|
||||
const baseSrc = fileURLToPath(new URL('./', import.meta.url))
|
||||
|
||||
export default defineConfig({
|
||||
title: 'vue3组件库站点',
|
||||
rewrites: getRewrites(),
|
||||
srcExclude: ['**/node_modules/**', '**/demos/**', '**/tests/**', '**/README.md'],
|
||||
mpa: true,
|
||||
themeConfig: {
|
||||
nav: getNav(),
|
||||
sidebar: getSidebar()
|
||||
},
|
||||
vite: {
|
||||
plugins: [
|
||||
vueJsxPlugin(),
|
||||
VitePluginVitepressDemo({
|
||||
glob: ['**/demos/**/*.vue']
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'antd-tiny-vue': resolve(baseSrc, '../../components')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
@ -1,10 +0,0 @@
|
||||
import type { DefaultTheme } from 'vitepress'
|
||||
|
||||
export const getNav = (): DefaultTheme.NavItem[] => {
|
||||
return [
|
||||
{
|
||||
text: '组件',
|
||||
link: '/components/'
|
||||
}
|
||||
]
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
export const getRewrites = (): Record<string, string> => {
|
||||
return {
|
||||
// '/site/index.md': '/index.md'
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
import type { DefaultTheme } from 'vitepress'
|
||||
|
||||
export const getSidebar = (): DefaultTheme.Sidebar => {
|
||||
return {
|
||||
'/components/': [
|
||||
{
|
||||
text: 'Button 按钮',
|
||||
link: '/components/button/'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
import type { Theme } from 'vitepress'
|
||||
// eslint-disable-next-line import/no-named-as-default
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { AntdTheme } from 'vite-plugin-vitepress-demo/theme'
|
||||
// @ts-expect-error this is a local module
|
||||
import Antd from 'antd-tiny-vue'
|
||||
|
||||
export default {
|
||||
...DefaultTheme,
|
||||
enhanceApp(ctx) {
|
||||
DefaultTheme.enhanceApp?.(ctx)
|
||||
ctx.app.component('Demo', AntdTheme)
|
||||
ctx.app.use(Antd)
|
||||
}
|
||||
} as Theme
|
1
site/components/index.md
Normal file
1
site/components/index.md
Normal file
@ -0,0 +1 @@
|
||||
# Components
|
1
site/components/index.zh-CN.md
Normal file
1
site/components/index.zh-CN.md
Normal file
@ -0,0 +1 @@
|
||||
# 组件
|
@ -10,7 +10,7 @@ hero:
|
||||
tagline: Simple, powerful, and performant. Meet the modern SSG framework you've always wanted.
|
||||
actions:
|
||||
- theme: brand
|
||||
text: 组件
|
||||
text: Components
|
||||
link: /components/
|
||||
- theme: alt
|
||||
text: View on GitHub
|
||||
|
28
site/index.zh-CN.md
Normal file
28
site/index.zh-CN.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
layout: home
|
||||
|
||||
title: Antd Tiny Vue
|
||||
titleTemplate: Vite & Vue Powered Static Site Generator
|
||||
|
||||
hero:
|
||||
name: Antd Tiny Vue
|
||||
text: Vite & Vue Powered Static Site Generator
|
||||
tagline: Simple, powerful, and performant. Meet the modern SSG framework you've always wanted.
|
||||
actions:
|
||||
- theme: brand
|
||||
text: 组件
|
||||
link: /zh-CN/components/
|
||||
- theme: alt
|
||||
text: View on GitHub
|
||||
link: https://github.com/antd-tiny-vue/antd-tiny-vue
|
||||
|
||||
features:
|
||||
- title: "Vite: The DX that can't be beat"
|
||||
details: Feel the speed of Vite. Instant server start and lightning fast HMR that stays fast regardless of the app size.
|
||||
- title: Designed to be simplicity first
|
||||
details: With Markdown-centered content, it's built to help you focus on writing and deployed with minimum configuration.
|
||||
- title: Power of Vue meets Markdown
|
||||
details: Enhance your content with all the features of Vue in Markdown, while being able to customize your site with Vue.
|
||||
- title: Fully static yet still dynamic
|
||||
details: Go wild with true SSG + SPA architecture. Static on page load, but engage users with 100% interactivity from there.
|
||||
---
|
Reference in New Issue
Block a user