aboutsummaryrefslogtreecommitdiff
path: root/src/layouts/BaseLayout.astro
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-09-13 01:57:55 +0300
committerValentin Popov <valentin@popov.link>2024-09-13 01:57:55 +0300
commit33c9464dad0979b05323e4d508875ad47e1c425f (patch)
tree2bc986dbbb0278250ec6c48c4a1dae43ea20bd08 /src/layouts/BaseLayout.astro
parentb16d8ce36ce5c603a4444979c30998416c416929 (diff)
downloadpopov.link-33c9464dad0979b05323e4d508875ad47e1c425f.tar.xz
popov.link-33c9464dad0979b05323e4d508875ad47e1c425f.zip
Refactor Analytics and Head components
Diffstat (limited to 'src/layouts/BaseLayout.astro')
-rw-r--r--src/layouts/BaseLayout.astro9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
index 6a253a8..8456916 100644
--- a/src/layouts/BaseLayout.astro
+++ b/src/layouts/BaseLayout.astro
@@ -9,17 +9,20 @@ type Props = {
readonly title?: string;
};
-const { title, description } = Astro.props;
+const { description, title } = Astro.props;
---
<html lang="ru">
- <Head title={title} description={description} />
+ <Head
+ description={description ?? import.meta.env.DEFAULT_DESCRIPTION}
+ title={title ?? import.meta.env.DEFAULT_TITLE}
+ />
<body>
<Header />
<main>
<slot />
</main>
- <Analytics />
+ <Analytics title={title ?? import.meta.env.DEFAULT_TITLE} />
</body>
</html>