feat: meta properties in Layout.astro
This commit is contained in:
parent
bad5a4e838
commit
071ebdfe66
1 changed files with 7 additions and 2 deletions
|
|
@ -3,19 +3,24 @@ import '../styles/global.css';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
|
description?: string;
|
||||||
showHeader?: boolean;
|
showHeader?: boolean;
|
||||||
isHome?: boolean;
|
isHome?: boolean;
|
||||||
urls?: string[];
|
urls?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, showHeader = true, isHome = false, urls = [] } = Astro.props;
|
const { title, description = 'personal website of lewis m.w.', showHeader = true, isHome = false, urls = [] } = Astro.props;
|
||||||
---
|
---
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
|
<meta name="description" content={description} />
|
||||||
|
<meta property="og:title" content={title} />
|
||||||
|
<meta property="og:description" content={description} />
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
<link rel="alternate" type="application/rss+xml" title="wynne.rs" href="/feed.xml" />
|
<link rel="alternate" type="application/rss+xml" title="wynne.rs" href="/feed.xml" />
|
||||||
{urls.length > 0 && <script is:inline define:vars={{ urls }}>window.__urls = urls;</script>}
|
{urls.length > 0 && <script is:inline define:vars={{ urls }}>window.__urls = urls;</script>}
|
||||||
<script is:inline src="/js/params.js"></script>
|
<script is:inline src="/js/params.js"></script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue