Add new Head component

This commit is contained in:
Korbs 2025-01-01 18:58:01 -05:00
parent 6aefe8f53c
commit ed0738d085
Signed by: Korbs
SSH key fingerprint: SHA256:Q0b0KraMldpAO9oKa+w+gcsXsOTykQ4UkAKn0ByGn5U
2 changed files with 29 additions and 1 deletions

View file

@ -6,8 +6,9 @@ import Hero from "./src/blocks/Hero.astro"
import Banner from "./src/Banner.astro"
import BlogPost from "./src/BlogPost.astro";
import Card from "./src/Card.astro";
import Head from "./src/Head.astro";
import Header from "./src/Header.astro";
import Image from "./src/Image.astro";
// Export
export {Banner, BlogPost, Card, CallToAction, Image, Header, Hero}
export {Banner, BlogPost, Card, CallToAction, Image, Head, Header, Hero}

27
src/Head.astro Normal file
View file

@ -0,0 +1,27 @@
---
const {
Title,
Description,
DarkReaderLock = 'false',
ThemeColor = '#121212',
Favicon
} = Astro.props
---
<head>
<!-- Metadata -->
<title>{Title}</title>
<meta name="description" content={Description}/>
<!-- Options -->
{DarkReaderLock ? <meta name="darkreader-lock"/> : null}
<meta charset="UTF-8"/>
<meta name="theme-color" content={ThemeColor}/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover"/>
<!-- Favicons -->
<link rel="icon" href={Favicon}/>
<!-- Others -->
<slot/>
</head>