chore: delete Open Graph configuration and change favicon format

This commit is contained in:
radishzzz 2025-03-13 06:26:49 +00:00
parent a556a622ab
commit db1bffb4c2
6 changed files with 9 additions and 19 deletions

View file

@ -1,4 +1,3 @@
import { themeConfig } from '@/config'
import { generateDescription } from '@/utils/description'
import { OGImageRoute } from 'astro-og-canvas'
import { getCollection } from 'astro:content'
@ -6,11 +5,6 @@ import { getCollection } from 'astro:content'
// eslint-disable-next-line antfu/no-top-level-await
const blogEntries = await getCollection('posts')
// 确定favicon路径是完整URL还是相对路径
const logoPath = themeConfig.site.favicon.startsWith('http')
? themeConfig.site.favicon
: `./public${themeConfig.site.favicon}`
// Convert to page data objects
const pages = Object.fromEntries(
blogEntries.map(post => [
@ -30,7 +24,7 @@ export const { getStaticPaths, GET } = OGImageRoute({
title: page.title,
description: page.description,
logo: {
path: logoPath,
path: './public/image/Astro-Icon-Dark.png',
size: [80],
},
font: {