diff --git a/src/components/HeadContent.astro b/src/components/HeadContent.astro new file mode 100644 index 0000000..388909a --- /dev/null +++ b/src/components/HeadContent.astro @@ -0,0 +1,45 @@ +--- +import { ViewTransitions } from "astro:transitions"; + +interface Props { + title?: string; + description?: string; + image?: string; + themeColor?: string; +} + +const { title, description, image, themeColor } = Astro.props; + +const fullTitle = title ? `${title} – Mikkel Svartveit` : "Mikkel Svartveit"; +const defaultDescription = + "Hi, I'm Mikkel! I am a Computer Science student from Norway and this is my playground. Here you will find some articles, programming projects, and a small collection of photos I'm proud of."; +const defaultImage = "/favicon.png"; +--- + + + + + + + + + +
diff --git a/src/pages/articles/index.astro b/src/pages/articles/index.astro
index bd23a4c..1dbee64 100644
--- a/src/pages/articles/index.astro
+++ b/src/pages/articles/index.astro
@@ -5,11 +5,14 @@ import ContainerLayout from "@layouts/ContainerLayout.astro";
import BaseLayout from "@layouts/BaseLayout.astro";
import TextContentLayout from "@layouts/TextContentLayout.astro";
import { getCollection } from "astro:content";
+import Head from "@components/HeadContent.astro";
const articles = await getCollection("blog");
---
- {
const photos = await Astro.glob("../../assets/photos/*");
@@ -20,20 +21,24 @@ export const getStaticPaths = (async () => {
const { photo } = Astro.props;
---
-
{
const programmingEntries = await getCollection("programming");
@@ -18,10 +19,13 @@ export const getStaticPaths = (async () => {
const project = Astro.props.entry;
const { Content } = await project.render();
-const { title, date, technologies, website, repository } = project.data;
+const { title, description, image, date, technologies, website, repository } =
+ project.data;
---
-
+