Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/chronicle/src/server/vite-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import react from '@vitejs/plugin-react';
import { remarkDirectiveAdmonition, remarkMdxMermaid } from 'fumadocs-core/mdx-plugins';
import { rehypeCodeDefaultOptions, remarkDirectiveAdmonition, remarkMdxMermaid } from 'fumadocs-core/mdx-plugins';
import { defineConfig as defineFumadocsConfig } from 'fumadocs-mdx/config';
import mdx from 'fumadocs-mdx/vite';
import { nitro } from 'nitro/vite';
Expand Down Expand Up @@ -191,6 +191,13 @@ export async function createViteConfig(
mdxOptions: {
remarkImageOptions: false,
valueToExport: ['readingTime', 'images'],
// Render fences in languages Shiki doesn't bundle (e.g. logql) as
// plain text instead of throwing. Defaults are spread because the
// config type isn't Partial — the factory merges them anyway.
rehypeCodeOptions: {
...rehypeCodeDefaultOptions,
fallbackLanguage: 'text',
},
remarkPlugins: [
remarkDirective,
[remarkDirectiveAdmonition, {
Expand Down
Loading