Quick Start
Creating a project
Run one of the following command Depend on what package manager you are using
PNPM first
Use pnpm as much as possible. It respects package version more than npm.
npm create @sveltepress@latest
sh
Adding to an existing sveltekit project
Install vite plugin package
npm install --save @sveltepress/vite
sh
Replace sveltekit
plugin in vite.config.(js|ts)
vite.config.(js|ts)
-
+
-
+
import { } from '@sveltejs/kit/vite'
import { } from '@sveltepress/vite'
import { } from 'vite'
const = ({
: [
(),
(),
],
})
export default
ts
Add '.md'
extension to the extensions
options in your svelte.config.js
svelte.config.js
-
+
import from '@sveltejs/adapter-static'
import { } from '@sveltejs/vite-plugin-svelte'
/**
* @type {import('@sveltejs/kit').Config}
*/
const = {
: ['.svelte'],
: ['.svelte', '.md'], // add .md here
: [()],
: {
: ({
: 'dist',
}),
},
}
export default
ts