mirror of
https://github.com/hyprwm/hyprland-website.git
synced 2024-11-16 18:35:59 +01:00
a77cd33926
* 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>
29 lines
879 B
JavaScript
Executable file
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
|