No description
  • CSS 38%
  • JavaScript 33.9%
  • HTML 11.5%
  • TypeScript 11.4%
  • Svelte 5.2%
Find a file
2026-05-11 14:30:33 +02:00
src + initial commit 2024-03-26 18:01:28 +01:00
static + initial commit 2024-03-26 18:01:28 +01:00
.editorconfig + initial commit 2024-03-26 18:01:28 +01:00
.eslintignore + initial commit 2024-03-26 18:01:28 +01:00
.eslintrc.cjs + initial commit 2024-03-26 18:01:28 +01:00
.gitignore ~ chore: updated versions 2024-08-23 20:00:11 +02:00
.npmrc + initial commit 2024-03-26 18:01:28 +01:00
.prettierignore + initial commit 2024-03-26 18:01:28 +01:00
.prettierrc + initial commit 2024-03-26 18:01:28 +01:00
LICENSE + initial commit 2024-03-26 18:01:28 +01:00
mdsvex.config.js + initial commit 2024-03-26 18:01:28 +01:00
package.json ~ updated dependencies 2026-05-11 13:25:48 +02:00
pnpm-lock.yaml ~ updated dependencies 2026-05-11 13:25:48 +02:00
pnpm-workspace.yaml ~ replaced the jenkins job by a forgejo action 2026-05-11 14:25:03 +02:00
README.md - dropped relocation note for github 2026-01-06 20:18:07 +01:00
svelte.config.js + initial commit 2024-03-26 18:01:28 +01:00
tsconfig.json + initial commit 2024-03-26 18:01:28 +01:00
vite.config.ts + initial commit 2024-03-26 18:01:28 +01:00

svelte-mdsvex-starter

This is a starter which uses Svelte 5, Typescript and MDSVEX.

Setup

Here is a list of the instructions for this project in case you want to recreate the project by yourself:

mkdir svelte-mdsvex-starter
cd svelte-mdsvex-starter

pnpm create svelte@latest
# Create a skeleton project using Typescript including ESLint, Prettier

pnpm i -D @fontsource/fira-mono
pnpm i -D @sveltejs/adapter-static
pnpm i -D mdsvex

Create a file ./src/routes/layout.ts with the following content (ssr):

export const prerender = true;

Create a file ./src/routes/+layout.svelte with the following content to include the CSS file:

<script>
    import './styles.css';
</script>

<slot />

Create the file ./src/routes/styles.css with the initial content as provided in this repo.

Create the file ./mdsvex.config.js with for mdsvex with the following content:

// @see https://mdsvex.com/docs#options
import { defineMDSveXConfig as defineConfig } from 'mdsvex';

const config = defineConfig({

    extensions: ['.svelte.md', '.md', '.svx'],

    remarkPlugins: [
    ],

});

export default config;

Update the file ./svelte.config.js to use this mdsvex config and change the adapter to static:

import { mdsvex } from 'mdsvex';
import mdsvexConfig from './mdsvex.config.js';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {

    extensions: ['.svelte', ...(mdsvexConfig.extensions ?? [])],

    // Consult https://kit.svelte.dev/docs/integrations#preprocessors
    // for more information about preprocessors
    preprocess: [
        mdsvex(mdsvexConfig),
        vitePreprocess(),
    ],

    kit: {
        // See https://kit.svelte.dev/docs/adapters for more information about adapters.
        adapter: adapter()
    }
};

export default config;

Developing

Once you've created a project and installed dependencies with pnpm install start a development server:

pnpm dev