Added PageComponents
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
---
|
||||
import { Font } from 'astro:assets'
|
||||
|
||||
import type { Article } from '@/lib/site/types'
|
||||
|
||||
import '@/styles/global.css'
|
||||
|
||||
import SiteFooter from '@/components/site/SiteFooter.astro'
|
||||
import SiteHeader from '@/components/site/SiteHeader.astro'
|
||||
import { resolveImage } from '@/lib/images/resolve'
|
||||
|
||||
interface Props {
|
||||
@@ -10,9 +14,10 @@ interface Props {
|
||||
description?: string
|
||||
image?: string
|
||||
noindex?: boolean
|
||||
article?: Article
|
||||
}
|
||||
|
||||
const { title, description, image, noindex } = Astro.props
|
||||
const { title, description, image, noindex, article } = Astro.props
|
||||
const canonical = new URL(Astro.url.pathname, Astro.site)
|
||||
const preview = image ? resolveImage(image) : undefined
|
||||
const previewUrl = preview ? new URL(preview.src, Astro.site) : undefined
|
||||
@@ -47,6 +52,10 @@ const previewUrl = preview ? new URL(preview.src, Astro.site) : undefined
|
||||
</style>
|
||||
</head>
|
||||
<body class="ui">
|
||||
<slot />
|
||||
<SiteHeader article={article} />
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
<SiteFooter />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user