Skip to content

Commit

Permalink
added tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-512 committed Apr 10, 2024
1 parent 9464da0 commit 4ccace2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/routes/blog/[slug]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script lang='ts'>
import profile from '$lib/images/profile-pic.png';
export let data;
const formatter = new Intl.DateTimeFormat('en-US', {
Expand All @@ -27,4 +25,11 @@
<span class='text-muted-foreground'>{data.metadata.description}</span>
</h1>
<small class=''>{formatter.format(new Date(data.metadata.date))}</small>

<div class='flex gap-2 mt-4'>
{#each data.metadata.tags as tag}
<span class='py-1 px-3 rounded-full bg-accent text-sm'>&num;{tag}</span>
{/each}
</div>

<svelte:component this={data.content}></svelte:component>

0 comments on commit 4ccace2

Please sign in to comment.