forked from ProjectSegfault/website
mdsvex improvements (needs external testing but works on my end)
Signed-off-by: Alexander J <odyssey346@disroot.org>
This commit is contained in:
parent
2f77b99a1f
commit
a5010e2caf
@ -2,11 +2,11 @@ import { defineMDSveXConfig as defineConfig } from "mdsvex";
|
||||
|
||||
const config = defineConfig({
|
||||
extensions: [".svelte.md", ".md", ".svx"],
|
||||
layout: "./src/lib/content.svelte",
|
||||
|
||||
smartypants: {
|
||||
dashes: "oldschool",
|
||||
},
|
||||
|
||||
remarkPlugins: [],
|
||||
rehypePlugins: [],
|
||||
});
|
||||
|
38
src/lib/content.svelte
Normal file
38
src/lib/content.svelte
Normal file
@ -0,0 +1,38 @@
|
||||
<script lang="ts">
|
||||
export let title;
|
||||
export let description;
|
||||
export let separator;
|
||||
import SvelteSeo from 'svelte-seo';
|
||||
// Enjoy the jank.
|
||||
if(title === "Project Segfault") {
|
||||
title = "";
|
||||
separator = "";
|
||||
}
|
||||
else {
|
||||
separator = "|";
|
||||
}
|
||||
</script>
|
||||
|
||||
<SvelteSeo
|
||||
openGraph={{
|
||||
title: title,
|
||||
description: description,
|
||||
type: 'website',
|
||||
images: [
|
||||
{
|
||||
url: 'https://projectsegfau.lt:8448/_matrix/media/r0/download/projectsegfau.lt/HBgjhWUExhKPzbpkpIqQfUkF',
|
||||
width: 850,
|
||||
height: 650,
|
||||
alt: 'Image'
|
||||
}
|
||||
]
|
||||
}}
|
||||
/>
|
||||
|
||||
<svelte:head>
|
||||
<title>{title} {separator} Project Segfault</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="mdsvex_content">
|
||||
<slot />
|
||||
</div>
|
@ -4,26 +4,12 @@
|
||||
import SvelteSeo from "svelte-seo"
|
||||
</script>
|
||||
|
||||
<title>Project Segfault</title>
|
||||
<svelte:head>
|
||||
<title>Project Segfault</title>
|
||||
</svelte:head>
|
||||
|
||||
<Header />
|
||||
|
||||
<main>
|
||||
<slot></slot>
|
||||
</main>
|
||||
|
||||
<SvelteSeo
|
||||
openGraph={{
|
||||
title: 'Project Segfault',
|
||||
description: '4 idiots and a Sun server.',
|
||||
type: 'website',
|
||||
images: [
|
||||
{
|
||||
url: 'https://projectsegfau.lt:8448/_matrix/media/r0/download/projectsegfau.lt/HBgjhWUExhKPzbpkpIqQfUkF',
|
||||
width: 850,
|
||||
height: 650,
|
||||
alt: 'Image'
|
||||
}
|
||||
]
|
||||
}}
|
||||
/>
|
||||
</main>
|
Loading…
Reference in New Issue
Block a user