dep updates & little flag :)

This commit is contained in:
2022-02-04 12:23:25 +01:00
parent 2a28d7d0a6
commit 95c8c8e8b0
12 changed files with 733 additions and 633 deletions

View File

@@ -1,10 +1,10 @@
<script lang="ts" context="module">
import type { Load } from '@sveltejs/kit'
export const load: Load = async ({ fetch, page }) => {
export const load: Load = async ({ fetch, params }) => {
return {
props: {
data: await fetch(`/api/posts/${page.params.slug}.json`).then((r) => r.json()),
data: await fetch(`/api/posts/${params.slug}.json`).then((r) => r.json()),
},
}
}
@@ -27,7 +27,7 @@
<SimplePage title={data.title} readable>
<PostAttributes post={data} full />
{#if data.content}
<WpAdapter content={data.content} />
<WpAdapter content={data.content} legend />
{/if}
<Tags tags={data.tags.nodes} />
</SimplePage>

View File

@@ -1,11 +1,11 @@
<script lang="ts" context="module">
import type { Load } from '@sveltejs/kit'
export const load: Load = async ({ fetch, page }) => {
export const load: Load = async ({ fetch, params }) => {
return {
props: {
slug: page.params.slug,
data: await fetch(`/api/postsByTags/${page.params.slug}.json`).then((r) => r.json()),
slug: params.slug,
data: await fetch(`/api/postsByTags/${params.slug}.json`).then((r) => r.json()),
},
}
}