diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro deleted file mode 100644 index eb39945..0000000 --- a/src/components/BaseHead.astro +++ /dev/null @@ -1,36 +0,0 @@ ---- -// Import the global.css file here so that it is included on -// all pages through the use of the component. -import '../styles/global.css'; -import { SITE_TITLE } from '../consts'; - -export interface Props { - title: string; - description: string; - image?: string; -} - -const { title, description, image = '/placeholder-social.jpg' } = Astro.props; - -const canonicalURL = new URL(Astro.url.pathname, Astro.site); -const actualTitle = title === 'home' ? SITE_TITLE : title + ' | ' + SITE_TITLE; ---- - - - - - - -{actualTitle} - - - - - - - - - - - - diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro new file mode 100644 index 0000000..c8ea10a --- /dev/null +++ b/src/layouts/BaseLayout.astro @@ -0,0 +1,57 @@ +--- +// Import the global.css file here so that it is included on +// all pages through the use of the component. +import '../styles/global.css'; +import { SITE_TITLE } from '../consts'; + +export interface Props { + title: string; + description: string; + image?: string; +} + +import Header from '../components/Header.astro'; +import Footer from '../components/Footer.astro'; + +export interface Props { + title: string; + description: string; + image?: string; +} + +const { title, description, image = '/placeholder-social.jpg' } = Astro.props; + +const canonicalURL = new URL(Astro.url.pathname, Astro.site); +const actualTitle = title === 'home' ? SITE_TITLE : `${title} | ${SITE_TITLE}`; +--- + + + + + + + + + + {actualTitle} + + + + + + + + + + + + + + +
+
+ +
+