hyprland-website/svelte.config.js
Visual-Dawg a77cd33926
Add blog feature (#34)
* better semantics, small improvments

* add blog feature

* update readme

* remove unused import

* Update README.md with typo fix , corrected instructions and improved clarity (#33)

* Update README.md with typo fix,corrected instructions and improved clarity

* Adjust bottom margin for better alignment on devices with >768px height

* newsSlice: adjust gradient

* newsSlice: fix masking

* newsSlice: pedantic alignment of the gradient

---------

Co-authored-by: Ashirbad Sahu <130544212+ashirbadsahu@users.noreply.github.com>
2023-12-17 22:35:11 +00:00

29 lines
879 B
JavaScript
Executable file

import adapter from '@sveltejs/adapter-static'
import { vitePreprocess } from '@sveltejs/kit/vite'
import { mdsvex, escapeSvelte } from 'mdsvex'
import shiki 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 shiki.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