一键导入
docusaurus-config
Use when working with docusaurus.config.js/ts files to validate or modify Docusaurus configuration
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when working with docusaurus.config.js/ts files to validate or modify Docusaurus configuration
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when looking up information from the latest Docusaurus documentation at https://docusaurus.io/docs
Use when migrating Docusaurus projects from v2 to v3
Use when creating Docusaurus plugins (remark, rehype, theme, content, lifecycle) to extend markdown, modify HTML, or add custom functionality
Use when swizzling Docusaurus theme components and editing theme elements
Use when writing or reviewing technical documentation to follow Google's documentation style guide - https://developers.google.com/style
| name | docusaurus-config |
| description | Use when working with docusaurus.config.js/ts files to validate or modify Docusaurus configuration |
Configuration lives in docusaurus.config.js or docusaurus.config.ts at project root.
import { Config } from "@docusaurus/types";
const config: Config = {
title: "My Site", // Required
url: "https://example.com", // Required, no trailing /
baseUrl: "/", // Required, must start and end with /
favicon: "img/favicon.ico",
organizationName: "my-org",
projectName: "my-project",
presets: [
[
"@docusaurus/preset-classic",
{
/* options */
},
],
],
themeConfig: {
/* theme config */
},
customFields: {
/* unknown fields go here */
},
};
export default config;
title, url, baseUrl are mandatorycustomFields objecturl no trailing slash, baseUrl must be /path/[name, options] array formatBefore editing: Read current config to preserve format (JS/TS, ESM/CommonJS)
After editing: Verify required fields, URL formats, and restart dev server
See references/detailed-guide.md for comprehensive examples