mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
Ensure some errors are logged to the console (#194)
* Clarify some error conditions in versioning * Clarify missing doc error; * Remove excess space * Remove excess space part duex
This commit is contained in:
parent
47c955c7b0
commit
459984516b
3 changed files with 62 additions and 8 deletions
|
@ -182,8 +182,15 @@ function processMetadata(file) {
|
|||
// process metadata for all docs and save into core/metadata.js
|
||||
function generateMetadataDocs() {
|
||||
console.log("Generating Metadata for Docs....");
|
||||
const order = readSidebar();
|
||||
|
||||
let order;
|
||||
try {
|
||||
order = readSidebar();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const regexSubFolder = /translated_docs\/(.*)\/.*/;
|
||||
|
||||
const enabledLanguages = [];
|
||||
|
@ -203,6 +210,7 @@ function generateMetadataDocs() {
|
|||
|
||||
if (extension === ".md" || extension === ".markdown") {
|
||||
const res = processMetadata(file);
|
||||
|
||||
if (!res) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue