commit 6abbfe563c13733f866ec3efd2f66932c808f923 parent af4e90435587b2a6f333ea95d11d726d05470457 Author: LukeJ <luke.jones.2567@gmail.com> Date: Wed, 15 Jul 2026 19:54:33 +0100 refactor: constants Diffstat:
| A | src/consts.ts | | | 1 | + |
| M | src/layouts/Base.astro | | | 4 | +++- |
| M | src/pages/index.astro | | | 2 | +- |
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/consts.ts b/src/consts.ts @@ -0,0 +1 @@ +export const SITE_TITLE = 'lukeonline'; diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro @@ -6,10 +6,12 @@ import Head from "../components/Head.astro"; import Header from "../components/Header.astro"; import Footer from "../components/Footer.astro"; +import { SITE_TITLE } from "../consts.ts"; + const { ...props } = Astro.props; --- <html class="bg-gray-200"> - <Head title={`lukeonline - ${props.title}`} /> + <Head title={`${SITE_TITLE} - ${props.title}`} /> <body class="w-full md:w-192 m-auto mt-8 text-base p-8"> <div class="border-solid border-1 p-8 bg-white"> <Header /> diff --git a/src/pages/index.astro b/src/pages/index.astro @@ -4,5 +4,5 @@ import Base from "../layouts/Base.astro"; const title = "Home"; --- <Base title={title}> - <p>hello world</p> + <p>hello world</p> </Base>