mirror of
https://github.com/danbulant/design
synced 2026-07-05 11:00:38 +00:00
better metadata
This commit is contained in:
parent
55fd9c183c
commit
9d172c6d1d
2 changed files with 17 additions and 9 deletions
|
|
@ -24,12 +24,16 @@
|
||||||
<meta property="og:article:published_time" content={date} />
|
<meta property="og:article:published_time" content={date} />
|
||||||
<meta property="og:article:author" content="Daniel Bulant" />
|
<meta property="og:article:author" content="Daniel Bulant" />
|
||||||
<meta property="og:article:tag" content={categories && categories.join(" ") || ""} />
|
<meta property="og:article:tag" content={categories && categories.join(" ") || ""} />
|
||||||
<meta property="og:image" content={bigThumbnail} />
|
{#if bigThumbnail}
|
||||||
<meta property="og:image:width" content="800" />
|
<meta property="og:image" content={bigThumbnail} />
|
||||||
<meta property="og:image:height" content="400" />
|
<meta property="og:image:width" content="800" />
|
||||||
<meta property="og:image" content={thumbnail} />
|
<meta property="og:image:height" content="400" />
|
||||||
<meta property="og:image:width" content="256" />
|
{/if}
|
||||||
<meta property="og:image:height" content="256" />
|
{#if thumbnail}
|
||||||
|
<meta property="og:image" content={thumbnail} />
|
||||||
|
<meta property="og:image:width" content="256" />
|
||||||
|
<meta property="og:image:height" content="256" />
|
||||||
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<main class:dark={$darkmode} class="post-layout">
|
<main class:dark={$darkmode} class="post-layout">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script context="module">
|
<script context="module">
|
||||||
/** @type {import('./[slug]').Load} */
|
/** @type {import('./index').Load} */
|
||||||
export async function load({ params, fetch, session, stuff }) {
|
export async function load({ params, fetch, session, stuff }) {
|
||||||
const response = await fetch("/api/posts.json");
|
const response = await fetch("/api/posts.json");
|
||||||
|
|
||||||
|
|
@ -28,7 +28,9 @@
|
||||||
var appTypeHover = null;
|
var appTypeHover = null;
|
||||||
|
|
||||||
export var posts;
|
export var posts;
|
||||||
$: console.log(posts);
|
$: if(typeof window !== "undefined") console.log(posts);
|
||||||
|
|
||||||
|
var selectedPost = posts && posts.find(t => !t.categories.includes("experiment"));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|
@ -57,7 +59,9 @@
|
||||||
</Hero>
|
</Hero>
|
||||||
<div class="blog">
|
<div class="blog">
|
||||||
I recently started my own blog.<br>
|
I recently started my own blog.<br>
|
||||||
You can checkout “<a href={posts[0].path}><b>{posts[0].title}</b></a>” and other recent blog posts:<br>
|
{#if selectedPost}
|
||||||
|
You can checkout “<a href={selectedPost.path}><b>{selectedPost.title}</b></a>” and other recent blog posts:<br>
|
||||||
|
{/if}
|
||||||
<div style="text-align: center; margin-top: 5px;">
|
<div style="text-align: center; margin-top: 5px;">
|
||||||
<Button href="/posts">blog</Button>
|
<Button href="/posts">blog</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue