Move head tag to BaseHead
This commit is contained in:
@@ -10,36 +10,38 @@ export interface Props {
|
||||
const { title, description, image = "/placeholder-social.jpg" } = Astro.props;
|
||||
---
|
||||
|
||||
<!-- Global Metadata -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<head>
|
||||
<!-- Global Metadata -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
|
||||
<!-- Web Monetization -->
|
||||
<meta name="monetization" content="$ilp.uphold.com/rEgHHBQGDUDP" />
|
||||
<!-- Web Monetization -->
|
||||
<meta name="monetization" content="$ilp.uphold.com/rEgHHBQGDUDP" />
|
||||
|
||||
<!-- Primary Meta Tags -->
|
||||
<title>{title}</title>
|
||||
<meta name="title" content={title} />
|
||||
<meta name="description" content={description} />
|
||||
<!-- Primary Meta Tags -->
|
||||
<title>{title}</title>
|
||||
<meta name="title" content={title} />
|
||||
<meta name="description" content={description} />
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={Astro.url} />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={new URL(image, Astro.url)} />
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={Astro.url} />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={new URL(image, Astro.url)} />
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:url" content={Astro.url} />
|
||||
<meta property="twitter:title" content={title} />
|
||||
<meta property="twitter:description" content={description} />
|
||||
<meta name="twitter:creator" content="@cassidoo" />
|
||||
<meta name="twitter:image" content="http://cassidoo.co/img/headshot.png" />
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:url" content={Astro.url} />
|
||||
<meta property="twitter:title" content={title} />
|
||||
<meta property="twitter:description" content={description} />
|
||||
<meta name="twitter:creator" content="@cassidoo" />
|
||||
<meta name="twitter:image" content="http://cassidoo.co/img/headshot.png" />
|
||||
|
||||
<link
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Roboto+Mono"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
/>
|
||||
</head>
|
||||
|
||||
@@ -4,42 +4,20 @@ import Header from "../components/Header.astro";
|
||||
import Footer from "../components/Footer.astro";
|
||||
import ColorScript from "../components/ColorScript.astro";
|
||||
|
||||
export interface Props {
|
||||
content: {
|
||||
title: string;
|
||||
description: string;
|
||||
added?: string;
|
||||
updatedDate?: string;
|
||||
heroImage?: string;
|
||||
};
|
||||
}
|
||||
|
||||
const {
|
||||
content: { title, description, added, updatedDate, heroImage },
|
||||
} = Astro.props as Props;
|
||||
} = Astro.props;
|
||||
---
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<BaseHead title={title} description={description} />
|
||||
<style>
|
||||
.title {
|
||||
font-size: 2em;
|
||||
margin: 0.25em 0 0;
|
||||
}
|
||||
hr {
|
||||
border-top: 1px solid #ddd;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<Header />
|
||||
<main>
|
||||
<article>
|
||||
{heroImage && <img width={720} height={360} src={heroImage} alt="" />}
|
||||
<h1 class="title">{title}</h1>
|
||||
<h1 class="article-title">{title}</h1>
|
||||
{added && <time>{added}</time>}
|
||||
{
|
||||
updatedDate && (
|
||||
|
||||
@@ -31,9 +31,7 @@ let tags = [...new Set(getTags)];
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||
</head>
|
||||
<body>
|
||||
<Header title={SITE_TITLE} />
|
||||
<main>
|
||||
|
||||
@@ -17,14 +17,7 @@ const posts = (await Astro.glob("../posts/*.md")).sort(
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||
<style>
|
||||
ul li {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<Header />
|
||||
<main>
|
||||
|
||||
@@ -37,14 +37,7 @@ const { tag: currentTag } = Astro.params;
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
|
||||
<style>
|
||||
ul li {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<Header />
|
||||
<main>
|
||||
|
||||
@@ -69,6 +69,11 @@ nav a:not(:last-child) {
|
||||
padding: 0 12px 0 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top: 1px solid #ddd;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: unset;
|
||||
@@ -159,6 +164,11 @@ h3 {
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
.article-title {
|
||||
font-size: 2em;
|
||||
margin: 0.25em 0 0;
|
||||
}
|
||||
|
||||
ul li time {
|
||||
flex: 0 0 130px;
|
||||
font-style: italic;
|
||||
|
||||
Reference in New Issue
Block a user