mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-09 21:07:46 +00:00
prettify
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { globToTutorial } from '$lib/utils/tutorials.js';
|
||||
import { setContext } from 'svelte';
|
||||
import { globToTutorial } from "$lib/utils/tutorials.js";
|
||||
import { setContext } from "svelte";
|
||||
|
||||
export let data;
|
||||
const tutorials = globToTutorial(data);
|
||||
setContext('tutorials', tutorials);
|
||||
export let data;
|
||||
const tutorials = globToTutorial(data);
|
||||
setContext("tutorials", tutorials);
|
||||
</script>
|
||||
|
||||
<slot />
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { LayoutLoad } from './$types';
|
||||
import type { LayoutLoad } from "./$types";
|
||||
|
||||
export const load: LayoutLoad = ({ url }) => {
|
||||
const tutorials = import.meta.glob('./**/*.markdoc', {
|
||||
eager: true
|
||||
});
|
||||
return {
|
||||
tutorials,
|
||||
pathname: url.pathname
|
||||
};
|
||||
const tutorials = import.meta.glob("./**/*.markdoc", {
|
||||
eager: true,
|
||||
});
|
||||
return {
|
||||
tutorials,
|
||||
pathname: url.pathname,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
import { redirect } from "@sveltejs/kit";
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
redirect(303, '/docs/tutorials/flutter/step-1');
|
||||
redirect(303, "/docs/tutorials/flutter/step-1");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user