udpate: img src通过配置onerror字段实现图源容灾

This commit is contained in:
afoim
2025-05-31 16:46:03 +08:00
parent d96fd18e05
commit c49d195e5f
5 changed files with 42 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ import remarkMath from "remark-math";
import remarkSectionize from "remark-sectionize";
import { AdmonitionComponent } from "./src/plugins/rehype-component-admonition.mjs";
import { GithubCardComponent } from "./src/plugins/rehype-component-github-card.mjs";
import { rehypeImageFallback } from "./src/plugins/rehype-image-fallback.mjs";
import { parseDirectiveNode } from "./src/plugins/remark-directive-rehype.js";
import { remarkExcerpt } from "./src/plugins/remark-excerpt.js";
import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs";
@@ -65,6 +66,7 @@ export default defineConfig({
rehypePlugins: [
rehypeKatex,
rehypeSlug,
rehypeImageFallback,
[
rehypeComponents,
{