spotube/website/svelte.config.js
Kingkor Roy Tirtho cd669e22c1
website: new sveltekit based website (#1239)
* feat: initialize website project

* feat: add initial homepage with download links

* feat: initial download page

* fix: linux icon color

* feat: add mobile nav and github star button

* feat: add older and nightly downloads page

* feat: add supporters and footer

* feat: add author details in about page

* feat: add darkmode toggle for website

* feat: add playstore and flathub download buttons and contribution button

* feat: add blogs support

* feat: remove netlify deploy config and add cloudflare config and favicons + manifest

* chore: add robots.txt

* feat: add spotube logo in navbar and fix build errors

* chore: add gap
2024-02-17 13:48:27 +06:00

56 lines
1.6 KiB
JavaScript

import adapter from '@sveltejs/adapter-cloudflare';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import readingTime from 'remark-reading-time';
import remarkExternalLinks from 'remark-external-links';
import slugPlugin from 'rehype-slug';
import autolinkHeadings from 'rehype-autolink-headings';
import relativeImages from 'mdsvex-relative-images';
import remarkGfm from 'remark-gfm';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.svx', '.md'],
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: [
vitePreprocess(),
mdsvex({
extensions: ['.svx', '.md'],
highlight: {},
layout: './src/lib/components/markdown/layout.svelte',
smartypants: {
dashes: 'oldschool'
},
remarkPlugins: [
remarkGfm,
// adds a `readingTime` frontmatter attribute
readingTime(),
relativeImages,
// external links open in a new tab
[remarkExternalLinks, { target: '_blank', rel: 'noopener' }]
],
rehypePlugins: [
slugPlugin,
[
autolinkHeadings,
{
behavior: 'wrap'
}
]
]
})
],
vitePlugin: {
inspector: true
},
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;