mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 16:47:26 +02:00
fix: change subcategory format (#1026)
* fix: change subcategory format * Fix sidebars * Refactor * Fix implementation * Change format
This commit is contained in:
parent
c277f46a60
commit
fe500dea82
19 changed files with 493 additions and 15047 deletions
|
@ -66,30 +66,10 @@ function autoPrefixCss(cssContent) {
|
|||
.then(result => result.css);
|
||||
}
|
||||
|
||||
// Validate the docs in the sidebar are valid
|
||||
function validateSidebar(metadata, sidebarMetadatas) {
|
||||
if (metadata.next) {
|
||||
if (!sidebarMetadatas[metadata.next]) {
|
||||
throw new Error(
|
||||
metadata.version
|
||||
? `Improper sidebars file for version ${
|
||||
metadata.version
|
||||
}, document with id '${
|
||||
metadata.next
|
||||
}' not found. Make sure that all documents with ids specified in this version's sidebar file exist and that no ids are repeated.`
|
||||
: `Improper sidebars.json file, document with id '${
|
||||
metadata.next
|
||||
}' not found. Make sure that documents with the ids specified in sidebars.json exist and that no ids are repeated.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getSubDir,
|
||||
getLanguage,
|
||||
isSeparateCss,
|
||||
minifyCss,
|
||||
autoPrefixCss,
|
||||
validateSidebar,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue