frontend: install and configure mdsvex

This commit is contained in:
dumbmoron
2024-06-29 17:58:00 +00:00
parent a856983810
commit 3aa17733d1
4 changed files with 98 additions and 550 deletions

View File

@ -1,12 +1,24 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
extensions: [".svelte", ".md"],
preprocess: [
vitePreprocess(),
mdsvex({
extensions: ['.md'],
layout: join(
dirname(fileURLToPath(import.meta.url)),
'/src/components/misc/ChangelogEntryWrapper.svelte'
)
})
],
kit: {
adapter: adapter({
// default options are shown. On some platforms