mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-22 18:21:33 +08:00
93 lines
3.3 KiB
Plaintext
93 lines
3.3 KiB
Plaintext
---
|
|
// Import the global.css file here so that it is included on
|
|
// all pages through the use of the <BaseHead /> component.
|
|
import '../styles/app.css'
|
|
|
|
import type { SiteMeta } from '@/types'
|
|
import { siteConfig } from '@/site-config'
|
|
|
|
type Props = SiteMeta
|
|
import { ViewTransitions } from 'astro:transitions'
|
|
const { articleDate, description, ogImage, title } = Astro.props
|
|
|
|
const titleSeparator = '•'
|
|
const siteTitle = `${title} ${titleSeparator} ${siteConfig.title}`
|
|
const canonicalURL = new URL(Astro.url.pathname, Astro.site)
|
|
const socialImageURL = new URL(ogImage ? ogImage : '/social-card.png', Astro.url).href
|
|
---
|
|
|
|
<meta charset='utf-8' />
|
|
<meta content='width=device-width, initial-scale=1.0, shrink-to-fit=no' name='viewport' />
|
|
<meta content='IE=edge' http-equiv='X-UA-Compatible' />
|
|
<meta name="baidu-site-verification" content="codeva-ZWUil8ENc0" />
|
|
<title>{siteTitle}</title>
|
|
|
|
{/* Icons / Favicon */}
|
|
<!-- <link href="favicon/favicon.ico" rel="icon" sizes="any" />
|
|
<link href="favicon/icon.svg" rel="icon" type="image/svg+xml" />
|
|
<link href="/apple-touch-icon.png" rel="apple-touch-icon" />
|
|
<link href="/manifest.webmanifest" rel="manifest" /> -->
|
|
|
|
<link rel='apple-touch-icon' sizes='180x180' href='/favicon/apple-touch-icon.png' />
|
|
<link rel='icon' type='image/png' sizes='32x32' href='/favicon/favicon-32x32.png' />
|
|
<link rel='icon' type='image/png' sizes='16x16' href='/favicon/favicon-16x16.png' />
|
|
<link rel='manifest' href='/favicon/site.webmanifest' />
|
|
|
|
{/* Font preloads */}
|
|
<!-- <link rel='preload' href='/fonts/Satoshi-Variable.ttf' as='font' type='font/ttf' crossorigin />
|
|
<link
|
|
rel='preload'
|
|
href='/fonts/Satoshi-VariableItalic.ttf'
|
|
as='font'
|
|
type='font/ttf'
|
|
crossorigin
|
|
/>
|
|
<link rel='preload' href='/fonts/ClashDisplay-Variable.ttf' as='font' type='font/ttf' crossorigin /> -->
|
|
|
|
{/* Canonical URL */}
|
|
<link rel='canonical' href={canonicalURL} />
|
|
|
|
{/* Primary Meta Tags */}
|
|
<meta content={siteTitle} name='title' />
|
|
<meta content={description} name='description' />
|
|
<meta content={siteConfig.author} name='author' />
|
|
|
|
{/* Theme Colour */}
|
|
<meta content='' name='theme-color' />
|
|
|
|
{/* Open Graph / Facebook */}
|
|
<meta content={articleDate ? 'article' : 'website'} property='og:type' />
|
|
<meta content={title} property='og:title' />
|
|
<meta content={description} property='og:description' />
|
|
<meta content={canonicalURL} property='og:url' />
|
|
<meta content={siteConfig.title} property='og:site_name' />
|
|
<meta content={siteConfig.ogLocale} property='og:locale' />
|
|
<meta content={socialImageURL} property='og:image' />
|
|
<meta content='1200' property='og:image:width' />
|
|
<meta content='630' property='og:image:height' />
|
|
{
|
|
articleDate && (
|
|
<>
|
|
<meta content={siteConfig.author} property='article:author' />
|
|
<meta content={articleDate} property='article:published_time' />
|
|
</>
|
|
)
|
|
}
|
|
|
|
{/* Twitter */}
|
|
<meta content='summary_large_image' property='twitter:card' />
|
|
<meta content={canonicalURL} property='twitter:url' />
|
|
<meta content={title} property='twitter:title' />
|
|
<meta content={description} property='twitter:description' />
|
|
<meta content={socialImageURL} property='twitter:image' />
|
|
|
|
{/* Sitemap */}
|
|
<link href='/sitemap-index.xml' rel='sitemap' />
|
|
|
|
{/* RSS auto-discovery */}
|
|
<link href='/rss.xml' rel='alternate' title={siteConfig.title} type='application/rss+xml' />
|
|
|
|
<meta content={Astro.generator} name='generator' />
|
|
|
|
<ViewTransitions />
|