Lotus
输入关键词搜索文档。

入门

Page Actions

Configure copy, Markdown, and AI actions shown near the page title.

pageActions controls the compact action button shown near the documentation page title.

pageActions: [
{ type: 'copy-page' },
{ type: 'view-markdown' },
{ type: 'open-chatgpt' },
{ type: 'open-claude' },
]

Set it to an empty array to disable the control.

pageActions: []

Built-In Actions

Lotus includes four built-in action types.

TypeBehavior
copy-pageFetches the generated .md route and copies Markdown to the clipboard.
view-markdownOpens the generated .md route.
open-chatgptOpens ChatGPT with the current page URL.
open-claudeOpens Claude with the current page URL.

Built-in labels and icons can be overridden.

pageActions: [
{ type: 'copy-page', label: 'Copy Markdown' },
{ type: 'view-markdown', label: 'Markdown source' },
]

Custom Actions

Custom actions use label, icon, href, and optional external.

pageActions: [
{
label: 'Open issue',
icon: 'lucide:bug',
href: 'https://github.com/prosefly/astro-theme-lotus/issues/new?title={encodedTitle}',
external: true,
},
]

Custom href values can use page variables.

VariableValue
{title}Page title
{url}Current page URL
{markdownUrl}Generated Markdown URL
{encodedTitle}URL-encoded page title
{encodedUrl}URL-encoded page URL
{encodedMarkdownUrl}URL-encoded Markdown URL

Layout

The first action is shown as an outline button. Remaining actions live in the dropdown opened by the chevron.

最后更新于 2026年7月18日

贡献者