hyprland-website/svelte.config.js
VDawg 8dd6b9a570
Add a Perks-slice (#106)
* doing doings

* wip more

* update content

* hero: decrease title line height

* wip hyprperks slice

* done prob

* remove subscribe now outline
2025-07-30 13:47:23 +02:00

29 lines
896 B
JavaScript
Executable file

import adapter from '@sveltejs/adapter-static'
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
import { mdsvex, escapeSvelte } from 'mdsvex'
import { getHighlighter } from 'shiki'
import remarkUnwrapImages from 'remark-unwrap-images'
import rehypeSlug from 'rehype-slug'
/** @type {import('mdsvex').MdsvexOptions} */
const mdsvexOptions = {
extensions: ['.md'],
highlight: {
highlighter: async (code, lang = 'text') => {
const highlighter = await getHighlighter({ theme: 'github-dark' })
const html = escapeSvelte(highlighter.codeToHtml(code, { lang }))
return `{@html \`${html}\` }`
}
},
remarkPlugins: [remarkUnwrapImages],
rehypePlugins: [rehypeSlug]
}
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.md'],
kit: { adapter: adapter() },
preprocess: [vitePreprocess(), mdsvex(mdsvexOptions)]
}
export default config