mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-23 03:29:11 +02:00
Enable sub-directories in docs/ (#705)
This commit is contained in:
parent
49c27b733b
commit
d04b3ca87b
10 changed files with 135 additions and 36 deletions
|
@ -46,13 +46,14 @@ function execute() {
|
|||
};
|
||||
|
||||
// look through markdown headers of docs for titles and categories to translate
|
||||
const docsDir = path.join(CWD, '../', readMetadata.getDocsPath());
|
||||
let files = glob.sync(CWD + '/../' + readMetadata.getDocsPath() + '/**');
|
||||
files.forEach(file => {
|
||||
const extension = path.extname(file);
|
||||
if (extension === '.md' || extension === '.markdown') {
|
||||
let res;
|
||||
try {
|
||||
res = readMetadata.processMetadata(file);
|
||||
res = readMetadata.processMetadata(file, docsDir);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue