From 7f01d5a12e34daef9676606a10d917306f1189e3 Mon Sep 17 00:00:00 2001 From: "Sandra Viktoria D. Toftemo" Date: Wed, 14 Aug 2024 10:13:53 +0200 Subject: [PATCH] refactor: use new default slug for project article (#757) * fix: use new default slug for project article * chore: delete unused file --- src/layouts/work.astro | 62 -------------------------------- src/pages/arbeid/[...slug].astro | 33 ++++++++++++++--- 2 files changed, 29 insertions(+), 66 deletions(-) delete mode 100644 src/layouts/work.astro diff --git a/src/layouts/work.astro b/src/layouts/work.astro deleted file mode 100644 index 43aaaf90..00000000 --- a/src/layouts/work.astro +++ /dev/null @@ -1,62 +0,0 @@ ---- -import type { MarkdownLayoutProps } from 'astro'; -import Layout, { type Props as DefaultLayoutProps } from './default.astro'; - -export type Props = MarkdownLayoutProps; -const { frontmatter } = Astro.props; ---- - - -
- { - frontmatter.headline && ( - - ) - } -
- -
-
-
- - diff --git a/src/pages/arbeid/[...slug].astro b/src/pages/arbeid/[...slug].astro index 8d3dfff0..f64dd38e 100644 --- a/src/pages/arbeid/[...slug].astro +++ b/src/pages/arbeid/[...slug].astro @@ -1,6 +1,6 @@ --- import { getCollection } from 'astro:content'; -import Layout from '@layouts/work.astro'; +import Layout from '@layouts/default.astro'; export async function getStaticPaths() { const blogEntries = await getCollection('project'); @@ -14,7 +14,32 @@ const { entry } = Astro.props; const { Content } = await entry.render(); --- - -

{entry.data.title}

- + +
+

{entry.data.title}

+ +
+ +