This commit is contained in:
parent
95259f3272
commit
527bc7447c
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@matthiesenxyz/astro-ghostcms-theme-default",
|
"name": "@matthiesenxyz/astro-ghostcms-theme-default",
|
||||||
"description": "Default Theme for astro-ghostcms",
|
"description": "Default Theme for astro-ghostcms",
|
||||||
"version": "0.0.6",
|
"version": "0.0.7",
|
||||||
"homepage": "https://astro-ghostcms.xyz/",
|
"homepage": "https://astro-ghostcms.xyz/",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
---
|
---
|
||||||
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
|
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
|
||||||
import BaseHead from "../components/BaseHead.astro";
|
import { AstroFont } from "astro-font";
|
||||||
|
import { ViewTransitions } from 'astro:transitions';
|
||||||
import MainLayout from "../components/MainLayout.astro";
|
import MainLayout from "../components/MainLayout.astro";
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
content?: {
|
content?: {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -9,21 +11,85 @@ export type Props = {
|
||||||
};
|
};
|
||||||
bodyClass?: string;
|
bodyClass?: string;
|
||||||
settings: Settings;
|
settings: Settings;
|
||||||
|
image?: string;
|
||||||
|
permalink?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const { content, settings, bodyClass = "" } = Astro.props as Props;
|
const { content, permalink, image, settings, bodyClass = "" } = Astro.props as Props;
|
||||||
const ghostAccentColor = settings.accent_color;
|
const ghostAccentColor = settings.accent_color;
|
||||||
---
|
---
|
||||||
|
|
||||||
<html lang="en" data-color-scheme="light">
|
<html lang="en" data-color-scheme="light">
|
||||||
<head>
|
<head>
|
||||||
<BaseHead
|
<AstroFont
|
||||||
title={content?.title
|
config={[
|
||||||
? `${settings.title} | ${content.title}`
|
{
|
||||||
: settings.title}
|
src: [],
|
||||||
description={content?.description ?? "Description"}
|
name: "Inter",
|
||||||
settings={settings}
|
preload: false,
|
||||||
|
display: "swap",
|
||||||
|
selector: "html",
|
||||||
|
fallback: "sans-serif",
|
||||||
|
googleFontsURL: 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap',
|
||||||
|
},
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<title>{content ? content.title + "|" + settings.title : settings.title}</title>
|
||||||
|
<ViewTransitions />
|
||||||
|
<meta name="title" content={content ? content.title : settings.title} />
|
||||||
|
{content?.description && <meta name="description" content={content.description} />}
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href={settings.icon} />
|
||||||
|
<link rel="shortcut icon" type="image/png" sizes="16x16" href={settings.icon} />
|
||||||
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
|
||||||
|
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="msapplication-TileColor" content="#da532c" />
|
||||||
|
<meta name="msapplication-config" content="/browserconfig.xml" />
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
|
<!-- Open Graph Tags (Facebook) -->
|
||||||
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:title" content={content?.title} />
|
||||||
|
{permalink && <meta property="og:url" content={permalink} />}
|
||||||
|
{content?.description && <meta property="og:description" content={content.description} />}
|
||||||
|
{image && <meta property="og:image" content={image} />}
|
||||||
|
|
||||||
|
<!-- Twitter -->
|
||||||
|
<meta property="twitter:card" content="summary_large_image" />
|
||||||
|
<meta property="twitter:title" content={content?.title} />
|
||||||
|
{permalink && <meta property="twitter:url" content={permalink} />}
|
||||||
|
{content?.description && <meta property="twitter:description" content={content.description} />}
|
||||||
|
{image && <meta property="twitter:image" content={image} />}
|
||||||
|
|
||||||
|
<!-- Link to the global style, or the file that imports constructs -->
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/themes/prism.min.css"
|
||||||
|
as="style"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js"
|
||||||
|
as="script"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload stylesheet"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/themes/prism.min.css"
|
||||||
|
as="style"
|
||||||
|
onload="this.onload=null;this.rel='stylesheet'"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
async
|
||||||
|
defer
|
||||||
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js"
|
||||||
|
>
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body class={bodyClass}>
|
<body class={bodyClass}>
|
||||||
<MainLayout settings={settings}>
|
<MainLayout settings={settings}>
|
||||||
|
|
Loading…
Reference in New Issue