Lotus
输入关键词搜索文档。

入门

Integrations

Configure Iconify preloading, Expressive Code, callout directives, CJK Markdown, and package manager tabs.

Lotus includes integrations for icons, syntax highlighting, callout directives, CJK-friendly Markdown, image galleries, and package-manager command tabs.

Iconify

Lotus installs the @prosefly/astro-components/integration integration internally. It preloads icons used by Lotus, icons used by Prosefly components, theme config icons, and static <Icon name="..."> usage in Astro and MDX files.

typescript
lotus({
iconify: {
apiBase: 'https://api.iconify.design',
preload: ['lucide:sparkles'],
scan: true,
},
})

Use preload for icons that cannot be detected statically.

Set scan: false when a project wants only explicit preload names.

Expressive Code

Expressive Code is enabled by default.

typescript
lotus({
markdown: {
expressiveCode: {
defaultProps: {
showLineNumbers: false,
},
},
},
})

Lotus configures light and dark Shiki themes, line numbers, copy button styling, and code frame styling to match the theme tokens.

Disable Expressive Code when a project should use Astro’s built-in Shiki renderer.

typescript
lotus({
markdown: {
expressiveCode: false,
},
})

Package Manager Tabs

Lotus enables the Prosefly package-manager tabs remark plugin by default. It turns recognized install commands into tabbed command blocks.

typescript
lotus({
markdown: {
packageManagerTabs: false,
},
})

Set markdown.packageManagerTabs to false to keep package-manager commands as normal code blocks.

Callout Directives

Lotus enables the Prosefly callout directive remark plugin by default. This adds Starlight-style admonition syntax for note, tip, warning, caution, and danger. See Admonitions for authoring syntax and usage guidance.

Set markdown.calloutDirectives to false to keep Markdown directives untouched.

typescript
lotus({
markdown: {
calloutDirectives: false,
},
})

CJK-Friendly Markdown

markdown.cjkFriendly controls CJK-friendly parsing for emphasis and GFM strikethrough. The default is auto: Lotus enables it when locales contains a Chinese, Japanese, or Korean locale key or lang value.

typescript
lotus({
locales: {
root: { label: 'English', directory: 'en' },
'zh-cn': { label: '简体中文', lang: 'zh-CN', directory: 'zh-cn' },
},
markdown: {
cjkFriendly: 'auto',
},
})

Set it to true to force the parser support on, or false to keep plain CommonMark and GFM parsing.

Image Galleries

Lotus also installs the Prosefly image gallery rehype plugin. Paragraphs that contain only Markdown images are transformed into responsive gallery figures.

See Images for authoring details.

Disable the transform when a project wants image-only paragraphs to stay as normal Markdown output.

typescript
lotus({
markdown: {
imageGallery: false,
},
})

Component Overrides

Use components to replace selected Lotus theme components. See Overriding Components for the complete override surface and examples.

最后更新于 2026年9月3日

贡献者