mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-25 06:49:23 +01:00
vitepress (#2076)
* Uses vitepress * migrates to vitepress * Remove api link * Adds gitignore * Adds gitignore * Removes unused colors * Removes optional for docker
This commit is contained in:
@@ -1,89 +1,18 @@
|
||||
/// <reference types="vitest" />
|
||||
import path from "path";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
import path from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import Pages from 'vite-plugin-pages'
|
||||
import Layouts from 'vite-plugin-vue-layouts'
|
||||
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Unocss from 'unocss/vite'
|
||||
import VueMacros from 'unplugin-vue-macros/vite'
|
||||
import Markdown from 'vite-plugin-vue-markdown'
|
||||
import LinkAttributes from 'markdown-it-link-attributes'
|
||||
import Shiki from 'markdown-it-shiki'
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import Unocss from "unocss/vite";
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'~/': `${path.resolve(__dirname, 'src')}/`,
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
VueMacros({
|
||||
plugins: {
|
||||
vue: Vue({
|
||||
include: [/\.vue$/, /\.md$/],
|
||||
reactivityTransform: true,
|
||||
}),
|
||||
},
|
||||
}),
|
||||
|
||||
// https://github.com/hannoeru/vite-plugin-pages
|
||||
Pages({
|
||||
extensions: ['vue', 'md'],
|
||||
}),
|
||||
|
||||
Layouts(),
|
||||
|
||||
// https://github.com/antfu/unplugin-auto-import
|
||||
AutoImport({
|
||||
imports: [
|
||||
'vue',
|
||||
'vue/macros',
|
||||
'vue-router',
|
||||
'@vueuse/core',
|
||||
],
|
||||
dts: true,
|
||||
dirs: [
|
||||
'./src/composables',
|
||||
],
|
||||
vueTemplate: true,
|
||||
}),
|
||||
|
||||
// https://github.com/antfu/vite-plugin-components
|
||||
Components({
|
||||
// allow auto load markdown components under `./src/components/`
|
||||
extensions: ['vue', 'md'],
|
||||
// allow auto import and register components used in markdown
|
||||
dirs: [path.resolve(__dirname, ".vitepress/theme/components")],
|
||||
extensions: ["vue", "md"],
|
||||
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
||||
dts: true,
|
||||
}),
|
||||
|
||||
// https://github.com/antfu/unocss
|
||||
// see unocss.config.ts for config
|
||||
Unocss(),
|
||||
Markdown({
|
||||
|
||||
headEnabled: true,
|
||||
markdownItSetup(md) {
|
||||
// https://prismjs.com/
|
||||
md.use(Shiki, {
|
||||
})
|
||||
md.use(LinkAttributes, {
|
||||
matcher: (link: string) => /^https?:\/\//.test(link),
|
||||
attrs: {
|
||||
target: '_blank',
|
||||
rel: 'noopener',
|
||||
},
|
||||
})
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
ssgOptions: {
|
||||
script: 'async',
|
||||
formatting: 'minify',
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user