feat: Use new entity-based cover #42
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: Research
|
||||||
|
---
|
||||||
|
# Research
|
||||||
|
|
||||||
|
I teach Lean!
|
|
@ -1,8 +1,8 @@
|
||||||
import siteMetadata from '$content/metadata.json';
|
|
||||||
|
|
||||||
export const routes: { route: string, name: string, disabled?: boolean }[] = [
|
export const routes: { route: string, name: string, disabled?: boolean }[] = [
|
||||||
{ route: "/", name: "Home" },
|
{ route: "/", name: "Home" },
|
||||||
{ route: "/post", name: "Blog" },
|
{ route: "/post", name: "Blog" },
|
||||||
{ route: "/tag", name: "Tags" },
|
{ route: "/tag", name: "Tags" },
|
||||||
{ route: "/gallery", name: "Gallery", disabled: true },
|
{ route: "/gallery", name: "Gallery", disabled: true },
|
||||||
].concat(siteMetadata?.extra || []);
|
{ route: "/research", name: "Research" },
|
||||||
|
{ route: "/archives", name: "Archives" },
|
||||||
|
]
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
import type { PageLoad } from './$types';
|
|
||||||
|
|
||||||
export const load: PageLoad = async ({ params }) => {
|
|
||||||
const post = await import(`$content/extra/${params.slug}.md`);
|
|
||||||
const Content = post.default;
|
|
||||||
|
|
||||||
return {
|
|
||||||
slug: params.slug,
|
|
||||||
metadata: post.metadata,
|
|
||||||
Content,
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
const { slug, metadata, Content } = data;
|
const { metadata, Content } = data;
|
||||||
import siteMetadata from '$content/metadata.json';
|
import siteMetadata from '$content/metadata.json';
|
||||||
|
|
||||||
const title = metadata?.title || (slug[0].toUpperCase() + slug.slice(1));
|
const title = metadata?.title
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { error } from '@sveltejs/kit';
|
||||||
|
import type { PageLoad } from './$types';
|
||||||
|
|
||||||
|
export const load: PageLoad = async (_) => {
|
||||||
|
const post = await import(`$content/extra/archives.md`);
|
||||||
|
if (!post) throw error(404);
|
||||||
|
const { name } = post.metadata;
|
||||||
|
const Content = post.default;
|
||||||
|
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
Content,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import type { PageData } from './$types';
|
||||||
|
export let data: PageData;
|
||||||
|
const { metadata, Content } = data;
|
||||||
|
import siteMetadata from '$content/metadata.json';
|
||||||
|
|
||||||
|
const title = metadata?.title
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>{title} | {siteMetadata.blogName}</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<article class="prose lg:prose-xl dark:prose-dark p-4">
|
||||||
|
<Content />
|
||||||
|
</article>
|
||||||
|
<hr />
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { error } from '@sveltejs/kit';
|
||||||
|
import type { PageLoad } from './$types';
|
||||||
|
|
||||||
|
export const load: PageLoad = async (_) => {
|
||||||
|
const post = await import(`$content/extra/research.md`);
|
||||||
|
if (!post) throw error(404);
|
||||||
|
const { name } = post.metadata;
|
||||||
|
const Content = post.default;
|
||||||
|
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
Content,
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue