|
1 | 1 | --- |
| 2 | +import { SEO } from "astro-seo"; |
| 3 | +import { getImagePath } from "astro-opengraph-images"; |
| 4 | +
|
2 | 5 | import Header from "./Header.astro"; |
3 | 6 | import Footer from "./Footer.astro"; |
4 | 7 | import Navigation from "./Navigation.astro"; |
5 | 8 | import "./Layout.css"; |
6 | 9 |
|
7 | | -
|
8 | | -const { pageTitle } = Astro.props; |
9 | | -const { url, site } = Astro; |
| 10 | +const { pageTitle, ogType, article, description } = Astro.props; |
| 11 | +const { url } = Astro; |
10 | 12 | --- |
11 | 13 |
|
12 | 14 | <html lang="en"> |
13 | | - <head> |
14 | | - <style> |
| 15 | + <head> |
| 16 | + <style> |
15 | 17 | .content { |
16 | 18 | flex: 1 0 auto; |
17 | 19 | } |
18 | 20 | </style> |
| 21 | + <SEO |
| 22 | + title={pageTitle} |
| 23 | + titleTemplate="%s | Violet Monserate" |
| 24 | + description={description || "Violet Monserate's Personal Website - a space for my resume, contact, and projects."} |
| 25 | + charset="UTF-8" |
| 26 | + openGraph={{ |
| 27 | + basic: { |
| 28 | + title: pageTitle, |
| 29 | + type: ogType || "website", |
| 30 | + image: "https://ctrl-vi.github.io/images/og_image.png", |
| 31 | + url: url, |
| 32 | + }, |
| 33 | + article: article || {}, |
| 34 | + optional: { |
| 35 | + description: description || "Violet Monserate's Personal Website", |
| 36 | + siteName: "Violet Monserate's Website", |
| 37 | + }, |
| 38 | + }} |
| 39 | + twitter={{ |
| 40 | + card: "summary", |
| 41 | + creator: "@VioletMonserate", |
| 42 | + title: pageTitle + " | Violet Monserate", |
| 43 | + description: description || "Violet Monserate's Personal Website - a space for my resume, contact, and projects.", |
| 44 | + image: "https://ctrl-vi.github.io/images/og_image.png", |
| 45 | + }} |
| 46 | + extend={{ |
| 47 | + link: [ |
| 48 | + {rel: "shortcut icon", sizes: "16x16 24x24 32x32 48x48 64x64", href: "favicon.ico"}, |
| 49 | + {rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png"}, |
| 50 | + {rel: "icon", type: "image/svg+xml", href: "/favicon.svg"}, |
| 51 | + {rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png"}, |
| 52 | + {rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png"}, |
| 53 | + {rel: "icon", type:"image/x-icon", href: "/favicon.ico"}, |
| 54 | + {rel: "manifest", href: "/site.webmanifest"}, |
| 55 | + {rel: "preconnect", href: "https://fonts.googleapis.com"}, |
| 56 | + {rel: "preconnect", href: "https://fonts.gstatic.com"}, |
| 57 | + {rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap"} |
| 58 | + ], |
| 59 | + meta: [ |
| 60 | + {name: "viewport", content: "width=device-width"}, |
| 61 | + {name: "generator", content: Astro.generator} |
| 62 | + ] |
| 63 | + }} |
19 | 64 |
|
20 | | - <meta charset="utf-8" /> |
21 | | - <!-- Meta tags for previews --> |
22 | | - <meta property="og:title" content={pageTitle} /> |
23 | | - <meta property="og:type" content="website" /> |
24 | | - <meta property="og:url" content={url} /> |
25 | | - <meta property="og:description" content="A personal website for Violet Monserate" /> |
26 | | - <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" /> |
27 | | - <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" /> |
28 | | - <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" /> |
29 | | - <link rel="manifest" href="/site.webmanifest" /> |
30 | | - <link |
31 | | - rel="stylesheet" |
32 | | - href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" |
33 | 65 | /> |
34 | | - <meta name="viewport" content="width=device-width" /> |
35 | | - <meta name="generator" content={Astro.generator} /> |
36 | | - <title>{pageTitle}</title> |
37 | 66 | </head> |
38 | 67 | <body> |
39 | 68 | <Header /> |
|
0 commit comments