mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 03:56:19 +02:00
chore: delete Open Graph configuration and change favicon format
This commit is contained in:
parent
a556a622ab
commit
db1bffb4c2
6 changed files with 9 additions and 19 deletions
|
@ -13,7 +13,7 @@ const { postTitle, postDescription, postSlug } = Astro.props
|
|||
const { title, subtitle, description, author, url, favicon } = themeConfig.site
|
||||
const { mode, light: { background: lightMode }, dark: { background: darkMode } } = themeConfig.color
|
||||
const { locale, moreLocale } = themeConfig.global
|
||||
const { verification = {}, twitterID = '', googleAnalyticsID = '', umamiAnalyticsID = '', openGraph: ogUrl } = themeConfig.seo ?? {}
|
||||
const { verification = {}, twitterID = '', googleAnalyticsID = '', umamiAnalyticsID = '' } = themeConfig.seo ?? {}
|
||||
const { google = '', bing = '', yandex = '', baidu = '' } = verification
|
||||
const { commentURL = '', imageHostURL = '', customGoogleAnalyticsJS = '', customUmamiAnalyticsJS = '' } = themeConfig.preload
|
||||
|
||||
|
@ -21,13 +21,13 @@ const initMetaTheme = mode === 'dark' ? darkMode : lightMode
|
|||
const pageTitle = postTitle ? `${postTitle} | ${title}` : `${title} - ${subtitle}`
|
||||
const pageDescription = postDescription || description
|
||||
// TODO: Change openGraph image fallback url
|
||||
const openGraph = typeof ogUrl === 'string' ? ogUrl : 'https://placehold.co/1200x630'
|
||||
const pageImage = postSlug ? `${url}/og/${postSlug}.png` : openGraph
|
||||
const pageImage = postSlug ? `${url}/og/${postSlug}.png` : 'https://placehold.co/1200x630'
|
||||
---
|
||||
<head>
|
||||
<!-- Basic info -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
{favicon.toLowerCase().endsWith('.svg') && <link rel="icon" type="image/svg+xml" href={favicon} />}
|
||||
{favicon.toLowerCase().endsWith('.png') && <link rel="icon" type="image/png" href={favicon} />}
|
||||
{favicon.toLowerCase().endsWith('.ico') && <link rel="icon" type="image/x-icon" href={favicon} />}
|
||||
<title>{pageTitle}</title>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue