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({
|
const config = defineConfig({
|
||||||
extensions: [".svelte.md", ".md", ".svx"],
|
extensions: [".svelte.md", ".md", ".svx"],
|
||||||
|
layout: "./src/lib/content.svelte",
|
||||||
|
|
||||||
smartypants: {
|
smartypants: {
|
||||||
dashes: "oldschool",
|
dashes: "oldschool",
|
||||||
},
|
},
|
||||||
|
|
||||||
remarkPlugins: [],
|
remarkPlugins: [],
|
||||||
rehypePlugins: [],
|
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"
|
import SvelteSeo from "svelte-seo"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
<title>Project Segfault</title>
|
<title>Project Segfault</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<Header />
|
<Header />
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</main>
|
</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'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}}
|
|
||||||
/>
|
|
Loading…
Reference in New Issue
Block a user