Szablon witryny, docker i workflow gitea
This commit is contained in:
43
src/layouts/BaseHead.astro
Normal file
43
src/layouts/BaseHead.astro
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
const { seo } = Astro.props;
|
||||
|
||||
const {
|
||||
title = "FUZ",
|
||||
description = "Lokalny operator internetu i telewizji.",
|
||||
canonical = "/",
|
||||
image = "/og/default.png",
|
||||
keywords = [],
|
||||
schema = {}
|
||||
} = seo ?? {};
|
||||
---
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
{keywords.length > 0 && (
|
||||
<meta name="keywords" content={keywords.join(", ")} />
|
||||
)}
|
||||
|
||||
<link rel="canonical" href={canonical} />
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={image} />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={image} />
|
||||
|
||||
{Object.keys(schema).length > 0 && (
|
||||
<script type="application/ld+json">
|
||||
{JSON.stringify(schema)}
|
||||
</script>
|
||||
)}
|
||||
|
||||
<slot />
|
||||
</head>
|
||||
Reference in New Issue
Block a user