mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-01 14:38:14 +00:00
plugin integration round 2
This commit is contained in:
parent
a757521313
commit
ad6ce0d73f
29 changed files with 3863 additions and 100 deletions
quartz/components
28
quartz/components/Head.tsx
Normal file
28
quartz/components/Head.tsx
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { StaticResources } from "../resources"
|
||||
|
||||
interface Props {
|
||||
title: string,
|
||||
description: string,
|
||||
externalResources: StaticResources,
|
||||
baseDir: string
|
||||
}
|
||||
|
||||
export default function({ title, description, externalResources, baseDir }: Props) {
|
||||
const { css, js } = externalResources
|
||||
const iconPath = baseDir + "/static/icon.png"
|
||||
const ogImagePath = baseDir + "/static/og-image.png"
|
||||
return <head>
|
||||
<title>{title}</title>
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={title} />
|
||||
<meta property="og:image" content={ogImagePath} />
|
||||
<meta property="og:width" content="1200" />
|
||||
<meta property="og:height" content="675" />
|
||||
<link rel="icon" href={iconPath} />
|
||||
<meta name="description" content={description} />
|
||||
<meta name="generator" content="Quartz" />
|
||||
<meta charSet="UTF-8" />
|
||||
{css.map(href => <link key={href} href={href} rel="stylesheet" type="text/css" />)}
|
||||
{js.filter(resource => resource.loadTime === "beforeDOMReady").map(resource => <script key={resource.src} src={resource.src} />)}
|
||||
</head>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue