* chore: remove bin * fix: restore bin * change dist to bin * publish only dist folder * publish with src folder. * fix ci * merge steps in CI * update workflow * deploy with src * update to v9 * delete unused code * complete landing page * complete landing page * feat: webflow template (#518) * created a new branch for webflow from debug/course-app * added webflow and reverted neccessary changes * fixed commit issues * clean up posthog * clean up classic * clean up minimal * clean up posthog * clean up webflow * v0.0.10 * markdown lint * feat: add prep template (#522) * working on the ielts template * working on the ielts template * finished the ielts template --------- Co-authored-by: emmanuel <[email protected]> * clean up examprep * v0.0.11 --------- Co-authored-by: Em_Dev <[email protected]>
48 lines
1.5 KiB
JavaScript
48 lines
1.5 KiB
JavaScript
import { mdsvex, escapeSvelte } from 'mdsvex';
|
|
import rehypeUnwrapImages from 'rehype-unwrap-images';
|
|
import remarkToc from 'remark-toc';
|
|
import rehypeSlug from 'rehype-slug';
|
|
import adapter from '@sveltejs/adapter-auto';
|
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
import { createHighlighter } from 'shiki';
|
|
|
|
/** @type {import('mdsvex').MdsvexOptions} */
|
|
const mdsvexOptions = {
|
|
extensions: ['.md'],
|
|
highlight: {
|
|
highlighter: async (code, lang = 'text') => {
|
|
const highlighter = await createHighlighter({
|
|
themes: ['poimandres'],
|
|
langs: ['javascript', 'typescript']
|
|
});
|
|
await highlighter.loadLanguage('javascript', 'typescript');
|
|
const html = escapeSvelte(highlighter.codeToHtml(code, { lang, theme: 'poimandres' }));
|
|
return `{@html \`${html}\` }`;
|
|
}
|
|
},
|
|
remarkPlugins: [[remarkToc, { tight: true }]],
|
|
rehypePlugins: [rehypeSlug]
|
|
};
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
preprocess: [vitePreprocess(), mdsvex(mdsvexOptions)],
|
|
|
|
kit: {
|
|
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
|
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
|
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
|
adapter: adapter(),
|
|
|
|
alias: {
|
|
'@/*': './src/lib/*',
|
|
$lib: './src/lib',
|
|
'$lib/*': './src/lib/*'
|
|
}
|
|
},
|
|
|
|
extensions: ['.svelte', '.md']
|
|
};
|
|
|
|
export default config;
|