diff --git a/lib/server/readMetadata.js b/lib/server/readMetadata.js index 0d88afbfd7e0..21677019daa7 100644 --- a/lib/server/readMetadata.js +++ b/lib/server/readMetadata.js @@ -145,7 +145,7 @@ function processMetadata(file, refDir) { // If a file is located in a subdirectory, prepend the subdir to it's ID // Example: - // (file: 'docusaurus/docs/projectA/test.md', ID 'test', refDir: 'docs') + // (file: 'docusaurus/docs/projectA/test.md', ID 'test', refDir: 'docusaurus/docs') // returns 'projectA/test' const subDir = utils.getSubDir(file, refDir); if (subDir) { diff --git a/lib/server/utils.js b/lib/server/utils.js index 843ca27c7568..efb22ac451ba 100644 --- a/lib/server/utils.js +++ b/lib/server/utils.js @@ -10,7 +10,7 @@ const env = require('./env.js'); // Return the subdirectory path from a reference directory // Example: -// (file: 'docs/projectA/test.md', refDir: 'subDir') +// (file: 'docs/projectA/test.md', refDir: 'docs') // returns 'projectA' function getSubDir(file, refDir) { let subDir = path.dirname(path.relative(refDir, file));