shadcn-vue/apps/www/.vitepress/config.mts
Sadegh Barati caa8994d22
docs: add color-scheme (#193)
* docs: add `color-scheme` to doc

this change will fix **Choose File** text color in input file

* docs: fix `Nuxt` logo in light mode

* docs: fix line number highlight
2023-12-01 10:33:53 +08:00

80 lines
2.3 KiB
TypeScript

import path from 'node:path'
import { defineConfig } from 'vitepress'
import Icons from 'unplugin-icons/vite'
import tailwind from 'tailwindcss'
import autoprefixer from 'autoprefixer'
import { siteConfig } from './theme/config/site'
import ComponentPreviewPlugin from './theme/plugins/previewer'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: siteConfig.name,
titleTemplate: ':title - shadcn/vue',
description: siteConfig.description,
head: [
['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
['link', { rel: 'shortcut icon', href: '/favicon-16x16.png' }],
['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon.png' }],
['link', { rel: 'manifest', href: '/site.webmanifest' }],
['meta', { name: 'theme-color', media: '(prefers-color-scheme: light)', content: 'white' }],
['meta', { name: 'theme-color', media: '(prefers-color-scheme: dark)', content: 'black' }],
['meta', { name: 'creator', content: 'radix-vue' }],
['meta', { name: 'theme-color', content: '#41b883' }],
['meta', { name: 'og:type', content: 'website' }],
['meta', { name: 'og:locale', content: 'en' }],
['meta', { name: 'og:site_name', content: siteConfig.name }],
['meta', { name: 'og:image', content: siteConfig.ogImage }],
['meta', { name: 'twitter:image', content: siteConfig.ogImage }],
],
sitemap: {
hostname: 'https://www.shadcn-vue.com',
transformItems(items) {
return items.filter(item => !item.url.includes('migration'))
},
},
lastUpdated: true,
themeConfig: {
search: {
provider: 'local',
},
editLink: {
pattern: 'https://github.com/radix-vue/shadcn-vue/tree/dev/apps/www/src/:path',
text: 'Edit this page on GitHub',
},
},
srcDir: path.resolve(__dirname, '../src'),
markdown: {
theme: 'css-variables',
config(md) {
md.use(ComponentPreviewPlugin)
},
},
rewrites: {
'content/(.*)': '(.*)',
},
vite: {
css: {
postcss: {
plugins: [
tailwind(),
autoprefixer(),
],
},
},
plugins: [
Icons({ compiler: 'vue3', autoInstall: true }),
],
resolve: {
alias: {
'@': path.resolve(__dirname, '../src'),
},
},
},
})