diff --git a/blog-cloudflare/src/layouts/Base.astro b/blog-cloudflare/src/layouts/Base.astro index b9bdde6..ee02ab7 100644 --- a/blog-cloudflare/src/layouts/Base.astro +++ b/blog-cloudflare/src/layouts/Base.astro @@ -1,5 +1,5 @@ --- -import { getMenu, getEmDashCollection } from "emdash"; +import { getMenu, getEmDashCollection, getSiteSettings } from "emdash"; import { WidgetArea, EmDashHead, @@ -36,7 +36,9 @@ const { author, content, } = Astro.props; -const siteTitle = "My Blog"; +const settings = await getSiteSettings(); +const siteTitle = settings?.title || "My Blog"; +const siteTagline = settings?.tagline || ""; // If title already includes site title (from getSeoMeta), use as-is const fullTitle = title.includes(siteTitle) ? title : `${title} — ${siteTitle}`; @@ -136,7 +138,7 @@ const isLoggedIn = !!Astro.locals.user;