add opengraph meta tags
This commit is contained in:
parent
15ab47f4d8
commit
859c34fd82
@ -10,10 +10,11 @@
|
||||
|
||||
<script>
|
||||
export let title, date;
|
||||
export const description = '';
|
||||
export let description = '';
|
||||
export const draft = false;
|
||||
export let toc = null;
|
||||
|
||||
export let slug;
|
||||
export let prev = null;
|
||||
export let next = null;
|
||||
</script>
|
||||
@ -91,7 +92,12 @@
|
||||
</style>
|
||||
|
||||
<svelte:head>
|
||||
<title>{title}</title>
|
||||
<title>{title} | Joe's Blog</title>
|
||||
<meta property="og:title" content="{title} | Joe's Blog">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:url" content="https://blog.jfmonty2.com/{slug}">
|
||||
<meta property="og:description" content={description}>
|
||||
<meta property="og:site_name" content="Joe's Blog">
|
||||
<link rel="stylesheet" href="/prism-dracula.css" />
|
||||
</svelte:head>
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
export async function load({ data }) {
|
||||
let post = await import(`./_posts/${data.slug}.svx`);
|
||||
post.metadata.slug = data.slug;
|
||||
post.metadata.next = data.next;
|
||||
return {
|
||||
post: post.default,
|
||||
|
@ -3,7 +3,3 @@
|
||||
</script>
|
||||
|
||||
<svelte:component this={data.post} />
|
||||
|
||||
<svelte:head>
|
||||
<title>Joe's Blog</title>
|
||||
</svelte:head>
|
||||
|
@ -4,6 +4,7 @@ import { error } from '@sveltejs/kit';
|
||||
export async function load({ url, params, data }) {
|
||||
try {
|
||||
let post = await import(`../_posts/${params.slug}.svx`);
|
||||
post.metadata.slug = params.slug;
|
||||
post.metadata.prev = data.prev;
|
||||
post.metadata.next = data.next;
|
||||
return {
|
||||
|
@ -6,7 +6,7 @@
|
||||
</style>
|
||||
|
||||
<svelte:head>
|
||||
<title>About Me</title>
|
||||
<title>About Me | Joe's Blog</title>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user