mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 08:37:25 +02:00
refactor: capitalize comments (#7188)
* refactor: capitalize comments * revert...
This commit is contained in:
parent
200009008b
commit
fa1ce230ea
99 changed files with 241 additions and 350 deletions
|
@ -156,15 +156,13 @@ function doProcessDocMetadata({
|
|||
parse_number_prefixes: parseNumberPrefixes = true,
|
||||
} = frontMatter;
|
||||
|
||||
// ex: api/plugins/myDoc -> myDoc
|
||||
// ex: myDoc -> myDoc
|
||||
// E.g. api/plugins/myDoc -> myDoc; myDoc -> myDoc
|
||||
const sourceFileNameWithoutExtension = path.basename(
|
||||
source,
|
||||
path.extname(source),
|
||||
);
|
||||
|
||||
// ex: api/plugins/myDoc -> api/plugins
|
||||
// ex: myDoc -> .
|
||||
// E.g. api/plugins/myDoc -> api/plugins; myDoc -> .
|
||||
const sourceDirName = path.dirname(source);
|
||||
|
||||
const {filename: unprefixedFileName, numberPrefix} = parseNumberPrefixes
|
||||
|
@ -347,7 +345,7 @@ export function addDocNavigation(
|
|||
}
|
||||
|
||||
const docsWithNavigation = docsBase.map(addNavData);
|
||||
// sort to ensure consistent output for tests
|
||||
// Sort to ensure consistent output for tests
|
||||
docsWithNavigation.sort((a, b) => a.id.localeCompare(b.id));
|
||||
return docsWithNavigation;
|
||||
}
|
||||
|
@ -434,7 +432,7 @@ export function getDocIds(doc: DocMetadataBase): [string, string] {
|
|||
return [doc.unversionedId, doc.id];
|
||||
}
|
||||
|
||||
// docs are indexed by both versioned and unversioned ids at the same time
|
||||
// Docs are indexed by both versioned and unversioned ids at the same time
|
||||
// TODO legacy retro-compatibility due to old versioned sidebars using
|
||||
// versioned doc ids ("id" should be removed & "versionedId" should be renamed
|
||||
// to "id")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue