chore: add rehypeUnwrapImg plugin for image processing optimization, update katex resource path

This commit is contained in:
radishzzz 2025-05-16 04:32:59 +01:00
parent 110fad06ab
commit 55923f9fcc
8 changed files with 93 additions and 74 deletions

View file

@ -1,6 +1,5 @@
---
import { ClientRouter } from 'astro:transitions'
import katexCSS from 'katex/dist/katex.min.css?url'
import { allLocales, defaultLocale, themeConfig } from '@/config'
import { ui } from '@/i18n/ui'
import { getPageInfo } from '@/utils/page'
@ -56,7 +55,7 @@ const pageImage = postSlug
<link rel="preload" href="/fonts/Snell-Black.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/fonts/Snell-Bold.woff2" as="font" type="font/woff2" crossorigin />
{commentEnabled && walineServerURL && <link rel="stylesheet" href="/assets/waline/waline.css" />}
{katexEnabled && <link rel="stylesheet" href={katexCSS} />}
{katexEnabled && <link rel="stylesheet" href="/assets/katex/katex.min.css" />}
<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="RSS Feed" />
<link rel="alternate" href="/atom.xml" type="application/atom+xml" title="Atom Feed" />
<link rel="sitemap" href="/sitemap-index.xml" />