diff --git a/src/assets/projects/dungeons-and-dining-tables.mdx b/src/assets/projects/dungeons-and-dining-tables.mdx
index 1755296..1ecca0a 100644
--- a/src/assets/projects/dungeons-and-dining-tables.mdx
+++ b/src/assets/projects/dungeons-and-dining-tables.mdx
@@ -24,5 +24,3 @@ externalLinks:
}
]
---
-
-I have been enjoying working with Catalyst Games on Dungeons and Dining Tables.
diff --git a/src/layouts/MainHead.astro b/src/layouts/MainHead.astro
index 779d9db..dcb023b 100644
--- a/src/layouts/MainHead.astro
+++ b/src/layouts/MainHead.astro
@@ -7,7 +7,14 @@ import Analytics from "@components/Analytics.astro";
import SEO from "@components/SEO.astro";
import ThemeManager from "@components/ThemeManager.astro";
-const { title, subtitle, description } = Astro.props;
+interface Props {
+ title?: string;
+ subtitle?: string;
+ description?: string;
+ image?: SiteImage;
+}
+
+const { title, subtitle, description, image } = Astro.props;
// if a title is provided, use it as follows "title | site.title - site.suffix". If no title is provided, instead do "site.title - site.suffix"
const headTitle: string =
@@ -26,7 +33,7 @@ const headDescription: string = description || site.description;
-
+
diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro
index c74f1c2..82cc4f7 100644
--- a/src/layouts/MainLayout.astro
+++ b/src/layouts/MainLayout.astro
@@ -4,6 +4,7 @@ interface Props {
subtitle?: string;
description?: string;
navbarDisplay?: "normal" | "transparent";
+ image?: SiteImage;
}
import "@/styles/global.css";
@@ -14,7 +15,13 @@ import Navbar from "@components/Navbar.astro";
import Player from "@components/Player.astro";
import MainHead from "@layouts/MainHead.astro";
-const { title, subtitle, description, navbarDisplay = "normal" } = Astro.props;
+const {
+ title,
+ subtitle,
+ description,
+ navbarDisplay = "normal",
+ image
+} = Astro.props;
const autoQueuedTracks = (
await getCollection("tracks", ({ data }) => data.autoQueue)
@@ -25,7 +32,7 @@ const autoQueuedTracks = (
-
+
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index 1c4fc30..a2aa969 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -1,4 +1,5 @@
import type { ImageMetadata } from "astro";
+import { getImage } from "astro:assets";
import type { CollectionEntry } from "astro:content";
type Project = CollectionEntry<"projects">;
@@ -13,12 +14,15 @@ const allProjectHeros = import.meta.glob<{ default: ImageMetadata }>(
{ eager: true }
);
-export function getProjectHero(project: Project): ImageMetadata | undefined {
+export function getProjectHero(project: Project): ImageMetadata {
+ let image: ImageMetadata = Object.values(allProjectHeros)[0].default;
for (const [path, mod] of Object.entries(allProjectHeros)) {
if (path.includes(project.data.images.hero.src)) {
- return mod.default;
+ image = mod.default;
}
}
+
+ return image;
}
export function getProjectOtherImages(project: Project): ImageMetadata[] {
@@ -99,3 +103,10 @@ export async function convertImagesImportGlobToArray(
return returnedImages;
}
+
+export async function getFullExternalURLOfImage(
+ image: ImageMetadata
+): Promise {
+ return new URL((await getImage({ src: image })).src, import.meta.env.SITE)
+ .href;
+}
diff --git a/src/pages/index.astro b/src/pages/index.astro
index b094036..9b2a665 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -203,14 +203,20 @@ const tracks = (
-
-
- Services
-
- This is where I will put a list of services I offer, such as web
- development, music composition, etc. Each service can link to a more
- detailed page.
-
+
+