Lotus
输入关键词搜索文档。

Configuration

Reference Lotus theme configuration fields, defaults, and related docs.

This reference lists top-level Lotus theme fields. Use the linked configuration pages for examples and behavior details.

Config Files

Lotus automatically reads theme.config.json from the Astro project root. Use JSON when your theme configuration is plain data and you want editor completion from the schema.

theme.config.json
{
"$schema": "https://prosefly.dev/schema/lotus.json",
"name": "My Docs",
"description": "Documentation for my project.",
"appearance": {
"accent": "emerald"
}
}

Register Lotus without arguments when all configuration lives in JSON:

astro.config.ts
import { defineConfig } from 'astro/config';
import lotus from '@prosefly/astro-theme-lotus';
export default defineConfig({
integrations: [lotus()],
});

Values passed to lotus({...}) override theme.config.json. Object options such as appearance, footer, iconify, locales, markdown, source, and ui are shallow-merged; arrays such as siteNav, socials, and docsNav replace the JSON value when provided.

Component overrides are integration-only. Configure components in astro.config.ts, not in theme.config.json.

Head Entries

Use head for global tags that should appear on every page, such as Open Graph defaults, Twitter cards, verification tags, external assets, scripts, or project CSS overrides:

theme.config.json
{
"head": [
{ "tag": "meta", "attrs": { "property": "og:site_name", "content": "My Docs" } },
{ "tag": "meta", "attrs": { "property": "og:image", "content": "https://example.com/og.png" } },
{ "tag": "meta", "attrs": { "name": "twitter:card", "content": "summary_large_image" } },
{ "tag": "style", "src": "./src/styles/lotus.css" }
]
}

style.src entries are resolved from the project root and loaded after Lotus styles. Page frontmatter head entries are merged after global entries.

Options

FieldDefaultSee
name'Documentation'Project
description'Project documentation.'Project
logobuilt-in Lotus markProject
faviconnoneProject
appearanceaccent: 'indigo', gray: 'neutral', defaultMode: 'system', radius: 'medium'Appearance
docsBase'/'Content Routing
defaultLocalefirst configured localeInternationalization
localesnoneInternationalization
uibuilt-in English messagesInternationalization
siteNavone Docs linkNavbar
socials[]Navbar
themeModeControl'segmented-control'Appearance
docsNav[]Docs Navigation
footerempty copyright and sectionsFooter
search{ provider: 'local' }Search
assistantfalseAssistant
llmstrueContent Routing
pageActionscopy, Markdown, ChatGPT, Claude, Grok, PerplexityPage Actions
sourceinferred when possibleSource
editLinkhiddenSource
contributorsfalseSource
components{} in lotus({...}) onlyOverriding Components
head[]CSS & Styling
creditstrueFooter
iconifydefault Iconify API, scan enabledIntegrations
markdownall transforms enabled, Expressive Code defaultsIntegrations

TypeScript Options

Use defineLotusConfig() inside astro.config.ts when configuration needs TypeScript, imports, or computed values:

astro.config.ts
import { defineConfig } from 'astro/config';
import lotus, { defineLotusConfig } from '@prosefly/astro-theme-lotus';
const lotusConfig = defineLotusConfig({
name: 'My Docs',
description: 'Documentation for my project.',
});
export default defineConfig({
integrations: [lotus(lotusConfig)],
});

Values passed to lotus({...}) override theme.config.json.

最后更新于 2026年9月3日

贡献者