0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-24 23:21:57 -05:00
astro/examples/blog-multiple-authors/src/components/MainHead.astro
Tony Sullivan 4b53a53c1b
Update examples for 0.24.0 (#2740)
* removing Astro.resolve, adding sass dev dependencies

* updating tailwind example to use ESM style imports

* moving from `<style global>@import` to ESM imports

* updating lockfile to pick up examples sass deps

* chore(lint): ESLint fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-09 13:52:31 -08:00

46 lines
1.5 KiB
Text

---
import '../styles/global.css';
export interface Props {
title: string;
description: string;
image?: string;
type?: string;
next?: string;
prev?: string;
canonicalURL?: string | URL;
}
const { title, description, image, type, next, prev, canonicalURL } = Astro.props as Props;
---
<!-- Common -->
<meta charset="UTF-8" />
<title>{title}</title>
<meta name="description" content={description} />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet" />
<!-- Sitemap -->
<link rel="sitemap" href="/sitemap.xml" />
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" href="/feed/posts.xml" />
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<!-- SEO -->
<link rel="canonical" href={canonicalURL} />
{next && <link rel="next" aria-label="Previous Page" href={new URL(next, canonicalURL).href}>}
{prev && <link rel="prev" aria-label="Next Page" href={new URL(prev, canonicalURL).href}>}
<!-- OpenGraph -->
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
{image && (<meta property="og:image" content={new URL(image, canonicalURL)}>)}
<!-- Twitter -->
<meta name="twitter:card" content={image ? 'summary_large_image' : 'summary'} />
<meta name="twitter:site" content="@astro" />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
{image && (<meta name="twitter:image" content={image}>)}