Integrations
Configure Iconify preloading, Expressive Code, callout directives, CJK Markdown, and package manager tabs.
Dahlia includes integrations for icons, syntax highlighting, callout directives, CJK-friendly Markdown, image galleries, and package-manager command tabs.
Iconify
Preload icon data used by the theme, MDX components, theme config, and
static Icon usage.
Expressive Code
Render syntax-highlighted code blocks with frames, copy buttons, markers, and theme-aware styling.
Package Manager Tabs
Turn recognized npm and Python install commands into synchronized tabbed command blocks.
Callout Directives
Write admonitions with Markdown directive syntax such as :::tip.
CJK-Friendly Markdown
Make emphasis and GFM strikethrough work better in Chinese, Japanese, and Korean text.
Image Galleries
Transform Markdown image-only paragraphs into responsive gallery figures.
Iconify
Dahlia installs the @prosefly/astro-components/icon integration internally.
It preloads icons used by Dahlia, icons used by Prosefly components, theme config
icons, and static <Icon name="..."> usage in Astro and MDX files.
dahlia({ 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.
dahlia({ markdown: { expressiveCode: { defaultProps: { showLineNumbers: false, }, }, },})Dahlia 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.
dahlia({ markdown: { expressiveCode: false, },})Package Manager Tabs
Dahlia enables the Prosefly package-manager tabs remark plugin by default. It turns recognized install commands into tabbed command blocks.
dahlia({ markdown: { packageManagerTabs: false, },})Set markdown.packageManagerTabs to false to keep package-manager commands
as normal code blocks.
Callout Directives
Dahlia 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.
dahlia({ markdown: { calloutDirectives: false, },})CJK-Friendly Markdown
markdown.cjkFriendly controls CJK-friendly parsing for emphasis and GFM
strikethrough. The default is auto: Dahlia enables it when locales contains a
Chinese, Japanese, or Korean locale key or lang value.
dahlia({ 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
Dahlia 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.
dahlia({ markdown: { imageGallery: false, },})Component Overrides
Use components to replace selected Dahlia theme components. See
Overriding Components for the
complete override surface and examples.