22import ' ../styles/globals.css'
33import { ClientRouter } from ' astro:transitions'
44import { BlogNavbar } from ' ../components/blog-navbar'
5+ import { Footer } from ' @explainer/ui'
6+ import { formatTitle } from ' @explainer/config'
7+ import { siteConfig } from ' ../config'
58import { useTranslations } from ' ../i18n/utils'
69
710interface Props {
@@ -13,7 +16,7 @@ interface Props {
1316 localeSwitchUrls? : Record <string , string >
1417}
1518
16- const { title, description = ' Explainer Blog ' , thumbnail, locale = ' en' , locales = [' en' ], localeSwitchUrls = {} } = Astro .props
19+ const { title, description = siteConfig . description , thumbnail, locale = ' en' , locales = [' en' ], localeSwitchUrls = {} } = Astro .props
1720const t = useTranslations (locale )
1821const thumbnailUrl = thumbnail ?? ` ${Astro .url .pathname .replace (/ \/ $ / , ' ' )}/thumbnail.png `
1922
@@ -29,17 +32,17 @@ const appUrlOverrides = {
2932 <head >
3033 <meta charset =" UTF-8" />
3134 <meta name =" viewport" content =" width=device-width, initial-scale=1.0" />
32- <link rel =" icon" type =" image/svg+xml" href =" /favicon.svg " />
35+ <link rel =" icon" type =" image/svg+xml" href ={ siteConfig . favicon } />
3336 <meta name =" description" content ={ description } />
3437 <meta property =" og:title" content ={ title } />
3538 <meta property =" og:description" content ={ description } />
3639 <meta property =" og:image" content ={ thumbnailUrl } />
37- <meta property =" og:type" content =" website " />
38- <meta name =" twitter:card" content =" summary_large_image " />
40+ <meta property =" og:type" content ={ siteConfig . ogType } />
41+ <meta name =" twitter:card" content ={ siteConfig . twitterCard } />
3942 <meta name =" twitter:title" content ={ title } />
4043 <meta name =" twitter:description" content ={ description } />
4144 <meta name =" twitter:image" content ={ thumbnailUrl } />
42- <title >{ title } — Blog </title >
45+ <title >{ formatTitle ( siteConfig , title ) } </title >
4346 <ClientRouter />
4447 <script is:inline >
4548 (function () {
@@ -61,10 +64,8 @@ const appUrlOverrides = {
6164 <main class =" mx-auto max-w-6xl px-6 py-10" >
6265 <slot />
6366 </main >
64- <footer class =" border-t mt-16" >
65- <div class =" mx-auto max-w-6xl px-6 py-8 text-sm text-muted-foreground" >
66- { t (' footer.text' )}
67- </div >
68- </footer >
67+ <div class =" mx-auto max-w-6xl px-6" >
68+ <Footer config ={ siteConfig } locale ={ locale } appUrlOverrides ={ appUrlOverrides } client:load />
69+ </div >
6970 </body >
7071</html >
0 commit comments