1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 09:13:35 +01:00
This commit is contained in:
Matthias Kretschmann 2023-09-19 14:24:12 +01:00
parent 124934e6fb
commit 0e41d6151b
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 25 additions and 9 deletions

View File

@ -21,7 +21,7 @@ const { title, image } = data
width={202}
height={202}
src={image}
alt={title}
alt={`Photo for ${title}`}
title={title}
objectFit
/>

View File

@ -21,7 +21,7 @@ const { image } = post.data as CollectionEntry<'articles'>['data']
<Picture
class={styles.image}
src={image}
alt={title}
alt={`Teaser for ${title}`}
width={686}
height={200}
objectFit

View File

@ -43,6 +43,8 @@ const schema: SchemaProps = {
}
const isProduction = import.meta.env.PROD
const shouldIncludeAnalytics =
isProduction && Astro.url.hostname === 'kremalicious.com'
const typekitID = import.meta.env.PUBLIC_TYPEKIT_ID
const { UMAMI_SCRIPT_URL, UMAMI_WEBSITE_ID } = getUmamiConfig()
@ -102,18 +104,29 @@ const faviconSvg = await getImage({ src: faviconSvgSrc, format: 'svg' })
{
typekitID && (
<link
rel="stylesheet"
href={`https://use.typekit.net/${typekitID}.css`}
/>
<>
<link rel="preconnect" href="https://use.typekit.net" />
<link rel="preconnect" href="https://p.typekit.net" />
<link
rel="stylesheet"
href={`https://use.typekit.net/${typekitID}.css`}
/>
</>
)
}
{style && <link rel="stylesheet" href={style} />}
{
isProduction && (
<script async src={UMAMI_SCRIPT_URL} data-website-id={UMAMI_WEBSITE_ID} />
shouldIncludeAnalytics && (
<>
<link rel="preconnect" href={UMAMI_SCRIPT_URL} />
<script
async
src={UMAMI_SCRIPT_URL}
data-website-id={UMAMI_WEBSITE_ID}
/>
</>
)
}
</head>

View File

@ -20,7 +20,8 @@ const schema = datePublished
'@type': 'BlogPosting',
author: {
'@type': 'Person',
name: author.name
name: author.name,
url: author.url
},
publisher: {
'@type': 'Organization',

View File

@ -28,6 +28,8 @@ export const GET: APIRoute = async () => {
start_url: '/',
display: 'standalone',
id: `${config.siteTitle}-blog`,
theme_color: '#e7eef4',
background_color: '#e7eef4',
icons
}