mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
Hanzo CI/CD / test-amd64 (push) Successful in 11m54s
Hanzo CI/CD / cicd (push) Failing after 9m5s
CI/CD / cicd (push) Failing after 21m3s
The theme is codeTheme from @hanzo/ui/core: Dracula on dark, GitHub Light on light, the one every Hanzo surface draws. lib/shiki.ts and each app's source.config.ts import it rather than naming a theme, so vesper and github-dark are gone. @hanzo/ui moves to 8.27.83, the first release that carries it. A block's code area paints the theme's own ground and ink from the pre shiki wrote, #282a36 in the dark, rather than the site's panel. The docs home drew its hero and its eight domain snippets as plain text, and so did the models page's fallback request. The hero highlights its three doors in a server part (components/hero.tsx); the snippets and the fallback are Example props in the MDX. No highlighter reaches the browser.
64 lines
1.7 KiB
TypeScript
64 lines
1.7 KiB
TypeScript
import {
|
|
applyMdxPreset,
|
|
defineConfig,
|
|
defineDocs,
|
|
frontmatterSchema,
|
|
metaSchema,
|
|
} from '@hanzo/docs-mdx/config';
|
|
import { z } from 'zod';
|
|
import lastModified from '@hanzo/docs-mdx/plugins/last-modified';
|
|
import { codeTheme } from '@hanzo/ui/core';
|
|
|
|
export const docs = defineDocs({
|
|
docs: {
|
|
schema: frontmatterSchema.extend({
|
|
index: z.boolean().default(false),
|
|
}),
|
|
postprocess: {
|
|
includeProcessedMarkdown: true,
|
|
extractLinkReferences: true,
|
|
},
|
|
async: true,
|
|
async mdxOptions(environment) {
|
|
const { rehypeCodeDefaultOptions } = await import('@hanzo/docs-core/mdx-plugins/rehype-code');
|
|
const { remarkStructureDefaultOptions } =
|
|
await import('@hanzo/docs-core/mdx-plugins/remark-structure');
|
|
const { remarkSteps } = await import('@hanzo/docs-core/mdx-plugins/remark-steps');
|
|
|
|
return applyMdxPreset({
|
|
remarkStructureOptions: {
|
|
types: [...remarkStructureDefaultOptions.types, 'code'],
|
|
},
|
|
rehypeCodeOptions: {
|
|
langs: ['ts', 'js', 'go', 'rust', 'python', 'bash', 'json', 'yaml', 'sql', 'typescript', 'javascript', 'shell'],
|
|
inline: 'tailing-curly-colon',
|
|
themes: codeTheme,
|
|
transformers: [
|
|
...(rehypeCodeDefaultOptions.transformers ?? []),
|
|
],
|
|
},
|
|
remarkCodeTabOptions: {
|
|
parseMdx: true,
|
|
},
|
|
remarkNpmOptions: {
|
|
persist: {
|
|
id: 'package-manager',
|
|
},
|
|
},
|
|
remarkPlugins: [remarkSteps],
|
|
})(environment);
|
|
},
|
|
},
|
|
meta: {
|
|
schema: metaSchema.extend({
|
|
description: z.string().optional(),
|
|
}),
|
|
},
|
|
});
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
lastModified(),
|
|
],
|
|
});
|