From 18aede91be332a122ab32ae049aaa7c217270dd1 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 27 Jul 2022 21:04:51 +0200 Subject: setup mdsvex --- web/pw-server/package.json | 1 + web/pw-server/svelte.config.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/web/pw-server/package.json b/web/pw-server/package.json index c8be055..474f38c 100644 --- a/web/pw-server/package.json +++ b/web/pw-server/package.json @@ -22,6 +22,7 @@ "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.1", "luxon": "^2.3.0", + "mdsvex": "^0.10.6", "prettier": "^2.4.1", "prettier-plugin-svelte": "^2.4.0", "sass": "^1.49.7", diff --git a/web/pw-server/svelte.config.js b/web/pw-server/svelte.config.js index 4eddd58..197fa56 100644 --- a/web/pw-server/svelte.config.js +++ b/web/pw-server/svelte.config.js @@ -1,15 +1,21 @@ import adapter from "@sveltejs/adapter-node"; -import preprocess from "svelte-preprocess"; +import sveltePreprocess from "svelte-preprocess"; import { viteCommonjs } from "@originjs/vite-plugin-commonjs"; import wasmPack from "vite-plugin-wasm-pack"; import { isoImport } from "vite-plugin-iso-import"; +import { mdsvex } from "mdsvex"; /** @type {import('@sveltejs/kit').Config} */ const config = { // Consult https://github.com/sveltejs/svelte-preprocess // for more information about preprocessors - preprocess: preprocess(), - + preprocess: [ + sveltePreprocess(), + mdsvex({ + extensions: ['.md'] + }), + ], + extensions: ['.svelte', '.md'], kit: { adapter: adapter(), -- cgit v1.2.3 From fd6664b8e7c49f620047714c4adc9b09fbbd2876 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Thu, 28 Jul 2022 20:32:10 +0200 Subject: set up docs route --- web/pw-server/src/routes/docs/doc.svelte | 10 ++++++++++ web/pw-server/src/routes/docs/rules.md | 3 +++ web/pw-server/svelte.config.js | 5 ++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 web/pw-server/src/routes/docs/doc.svelte create mode 100644 web/pw-server/src/routes/docs/rules.md diff --git a/web/pw-server/src/routes/docs/doc.svelte b/web/pw-server/src/routes/docs/doc.svelte new file mode 100644 index 0000000..ded3a6c --- /dev/null +++ b/web/pw-server/src/routes/docs/doc.svelte @@ -0,0 +1,10 @@ +
+ +
+ + \ No newline at end of file diff --git a/web/pw-server/src/routes/docs/rules.md b/web/pw-server/src/routes/docs/rules.md new file mode 100644 index 0000000..75d99a6 --- /dev/null +++ b/web/pw-server/src/routes/docs/rules.md @@ -0,0 +1,3 @@ +# Rules + +Hello welcome on the rules page \ No newline at end of file diff --git a/web/pw-server/svelte.config.js b/web/pw-server/svelte.config.js index 197fa56..fe396f9 100644 --- a/web/pw-server/svelte.config.js +++ b/web/pw-server/svelte.config.js @@ -12,7 +12,10 @@ const config = { preprocess: [ sveltePreprocess(), mdsvex({ - extensions: ['.md'] + extensions: ['.md'], + layout: { + docs: 'src/routes/docs/doc.svelte', + } }), ], extensions: ['.svelte', '.md'], -- cgit v1.2.3