@@ -22,7 +19,7 @@
diff --git a/src/lib/components/Blog/Crumbs.svelte b/src/lib/components/Blog/Crumbs.svelte
new file mode 100644
index 0000000..1e0b103
--- /dev/null
+++ b/src/lib/components/Blog/Crumbs.svelte
@@ -0,0 +1,20 @@
+
+
+
diff --git a/src/lib/components/Blog/PostCard.svelte b/src/lib/components/Blog/PostCard.svelte
index a860079..b2f4078 100644
--- a/src/lib/components/Blog/PostCard.svelte
+++ b/src/lib/components/Blog/PostCard.svelte
@@ -5,17 +5,23 @@
import PostMetadata from './PostMetadata.svelte';
import { faker } from '@faker-js/faker';
- export let doc: BlogDocument;
+ export let doc: {
+ metadata: PostMeta;
+ content: string;
+ slug: string;
+ };
- {doc.title}
- {doc.blurb}
+
+ {doc.metadata.title}
+
+ {doc.metadata.manifest.blurb}
@@ -26,7 +32,7 @@
class="col-span-3 md:col-span-1 rounded-2xl shadow-md"
/>
- {doc.description}
+ {doc.metadata.manifest.description}
diff --git a/src/lib/components/Blog/PostMetadata.svelte b/src/lib/components/Blog/PostMetadata.svelte
index d8ee9d0..92f3f8b 100644
--- a/src/lib/components/Blog/PostMetadata.svelte
+++ b/src/lib/components/Blog/PostMetadata.svelte
@@ -7,7 +7,7 @@
- `primaryTags` - An array of strings representing the primary tags of the post.
- `secondaryTags` - An array of strings representing the secondary tags of the post.
- - `time` - A unix epoch integer representing the time the post was published.
+ - `date` -
- `length` - An integer representing amount of words in the post.
- `reverseDateAndRest` - A boolean that determines whether the date should be displayed at the bottom of the metadata.
@@ -20,21 +20,22 @@
import Badge from '../ui/badge/badge.svelte';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
+ import { onMount } from 'svelte';
dayjs.extend(relativeTime);
export let primaryTags: string[] = [];
export let secondaryTags: string[] = [];
- export let time: number;
+ export let date: Date;
export let length: number;
export let reverseDateAndRest: boolean = false;
- let date = dayjs(time * 1000);
+ let dayjsDate = dayjs(date);
{#if !reverseDateAndRest}
- {date.format('MMMM DD, YYYY')}
+ {dayjsDate.format('MMMM DD, YYYY')}
{/if}
{#each primaryTags as tag}
@@ -46,9 +47,9 @@
- {dayjs(date).fromNow()} | {Math.ceil(length / 238)} min read | {length} words
+ {dayjsDate.fromNow()} | {Math.ceil(length / 238)} min read | {length} words
{#if reverseDateAndRest}
- {date.format('MMMM DD, YYYY')}
+ {dayjsDate.format('MMMM DD, YYYY')}
{/if}
diff --git a/src/lib/components/Navbar/Navbar.svelte b/src/lib/components/Navbar/Navbar.svelte
index e142629..615deb7 100644
--- a/src/lib/components/Navbar/Navbar.svelte
+++ b/src/lib/components/Navbar/Navbar.svelte
@@ -26,7 +26,9 @@
});
-
{doc.title}
-{doc.blurb}
++ {doc.metadata.title} +
+{doc.metadata.manifest.blurb}
{doc.description}
+{doc.metadata.manifest.description}
diff --git a/src/lib/components/Blog/PostMetadata.svelte b/src/lib/components/Blog/PostMetadata.svelte index d8ee9d0..92f3f8b 100644 --- a/src/lib/components/Blog/PostMetadata.svelte +++ b/src/lib/components/Blog/PostMetadata.svelte @@ -7,7 +7,7 @@ - `primaryTags` - An array of strings representing the primary tags of the post. - `secondaryTags` - An array of strings representing the secondary tags of the post. - - `time` - A unix epoch integer representing the time the post was published. + - `date` - - `length` - An integer representing amount of words in the post. - `reverseDateAndRest` - A boolean that determines whether the date should be displayed at the bottom of the metadata. @@ -20,21 +20,22 @@ import Badge from '../ui/badge/badge.svelte'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; + import { onMount } from 'svelte'; dayjs.extend(relativeTime); export let primaryTags: string[] = []; export let secondaryTags: string[] = []; - export let time: number; + export let date: Date; export let length: number; export let reverseDateAndRest: boolean = false; - let date = dayjs(time * 1000); + let dayjsDate = dayjs(date);{date.format('MMMM DD, YYYY')}
+{dayjsDate.format('MMMM DD, YYYY')}
{/if} {#each primaryTags as tag} @@ -46,9 +47,9 @@ - {dayjs(date).fromNow()} | {Math.ceil(length / 238)} min read | {length} words + {dayjsDate.fromNow()} | {Math.ceil(length / 238)} min read | {length} words {#if reverseDateAndRest} -{date.format('MMMM DD, YYYY')}
+{dayjsDate.format('MMMM DD, YYYY')}
{/if}