2022-10-21 14:45:50 +02:00
|
|
|
/** @type {import('./$types').PageLoad} */
|
2022-10-21 15:20:04 +02:00
|
|
|
import { base } from '$app/paths';
|
2022-10-27 22:54:38 +02:00
|
|
|
import { marked } from 'marked';
|
2022-10-21 14:45:50 +02:00
|
|
|
|
2022-10-27 22:54:38 +02:00
|
|
|
marked.setOptions({ gfm: true });
|
2022-10-21 14:45:50 +02:00
|
|
|
export async function load({ fetch }) {
|
2022-10-21 15:20:04 +02:00
|
|
|
const response = await fetch(`${base}/hacker-manual.md`).then((r) => r.text());
|
2022-10-22 17:02:54 +02:00
|
|
|
|
2022-10-27 22:54:38 +02:00
|
|
|
const compiledResponse = await marked.parse(response);
|
2022-10-21 14:45:50 +02:00
|
|
|
return { content: compiledResponse };
|
|
|
|
}
|