diff --git a/astro.config.mjs b/astro.config.mjs index c583ea9..47c1a01 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,11 +4,12 @@ import mdx from "@astrojs/mdx"; import sitemap from "@astrojs/sitemap"; import { defineConfig, fontProviders } from "astro/config"; import tailwindcss from "@tailwindcss/vite"; -import { SITE_URL } from "./src/consts"; + +import { SiteConfig } from "./src/site.config"; // https://astro.build/config export default defineConfig({ - site: SITE_URL, + site: SiteConfig.url, integrations: [mdx(), sitemap()], vite: { plugins: [tailwindcss()], diff --git a/src/components/Head.astro b/src/components/Head.astro index 73190c3..efb9c1e 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -1,7 +1,6 @@ --- import "../styles/global.css"; import type { ImageMetadata } from "astro"; -import { SITE_TITLE } from "../consts"; import { Font } from "astro:assets"; interface Props { @@ -25,7 +24,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site); diff --git a/src/consts.ts b/src/consts.ts deleted file mode 100644 index 48b7479..0000000 --- a/src/consts.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Place any global data in this file. -// You can import this data from anywhere in your site by using the `import` keyword. - -export const SITE_TITLE = "likes.fyi prototypes"; -export const SITE_DESCRIPTION = "my prototypes. let me show you them."; -export const SITE_URL = "https://prototypes.likes.fyi"; diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 8691860..743948d 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,24 +1,26 @@ --- import Head from "../components/Head.astro"; import FallbackImage from "../assets/blog-placeholder-1.jpg"; -import { SITE_DESCRIPTION, SITE_TITLE } from "../consts"; interface Props { - title?: string; - description?: string; - image?: ImageMetadata; + title: string; + subtitle: string; + frontmatter: { + title: string; + subtitle: string; + } } const { - title = SITE_TITLE, - description = SITE_DESCRIPTION, - image = FallbackImage, + frontmatter, + title = frontmatter.title, + subtitle = frontmatter.subtitle, } = Astro.props; --- -
+