documentation kick off
This commit is contained in:
parent
acdeef47bf
commit
ecec0f4e6f
8 changed files with 468 additions and 74 deletions
|
@ -1,18 +1,44 @@
|
|||
import { fileURLToPath, URL } from 'node:url'
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import vueDevTools from "vite-plugin-vue-devtools";
|
||||
import Markdown from "unplugin-vue-markdown/vite";
|
||||
import hljs from "highlight.js";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
vue({
|
||||
include: [/\.vue$/, /\.md$/],
|
||||
}),
|
||||
vueDevTools(),
|
||||
Markdown({
|
||||
// Optionen für Markdown-It (optional)
|
||||
markdownItOptions: {
|
||||
html: true,
|
||||
linkify: true,
|
||||
typographer: true,
|
||||
},
|
||||
markdownItSetup(md) {
|
||||
// Syntax-Highlighting aktivieren
|
||||
md.set({
|
||||
highlight: (str, lang) => {
|
||||
if (lang && hljs.getLanguage(lang)) {
|
||||
try {
|
||||
return `<pre class="hljs" style="padding:8px"><code>${hljs.highlight(str, { language: lang }).value}</code></pre>`;
|
||||
} catch (__) {}
|
||||
}
|
||||
return `<pre class="hljs" style="padding:8px"><code>${md.utils.escapeHtml(str)}</code></pre>`;
|
||||
},
|
||||
});
|
||||
},
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
}
|
||||
})
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
$: fileURLToPath(new URL("./docs", import.meta.url)),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue