validate-theme-config-navbar-style
Require static themeConfig.navbar.style values to use supported Docusaurus navbar styles.
Targeted pattern scopeโ
This rule targets docusaurus.config.* files and inspects themeConfig.navbar.style.
What this rule reportsโ
This rule reports static navbar style values that are invalid or use non-canonical casing/whitespace.
Why this rule existsโ
Navbar style values affect the public appearance of the site header and should stay within Docusaurus' supported set.
โ Incorrectโ
export default {
themeConfig: {
navbar: { style: "Dark" },
},
};
export default {
themeConfig: {
navbar: { style: "secondary" },
},
};
โ Correctโ
export default {
themeConfig: {
navbar: { style: "dark" },
},
};
export default {
themeConfig: {
navbar: { style: "primary" },
},
};
Behavior and migration notesโ
This rule autofixes valid-but-noncanonical static strings such as "Dark".
For invalid static values, it reports and provides suggestions to set the style to "dark" or "primary".
When not to use itโ
Do not use this rule if your project intentionally injects nonstandard navbar style values through a later transform step.
Rule catalog ID: R080