Add new Head component
This commit is contained in:
parent
6aefe8f53c
commit
ed0738d085
2 changed files with 29 additions and 1 deletions
3
index.ts
3
index.ts
|
@ -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
27
src/Head.astro
Normal 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>
|
Loading…
Add table
Reference in a new issue