mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
Merge pull request #61 from facebookexperimental/error-messages
Add better error messages for most common cases
This commit is contained in:
commit
db7a7394b3
9 changed files with 60 additions and 12 deletions
|
@ -128,6 +128,12 @@ class HeaderNav extends React.Component {
|
|||
"-" +
|
||||
link.doc;
|
||||
}
|
||||
if (!Metadata[id]) {
|
||||
throw new Error(
|
||||
"A headerLink is specified with a document that does not exist. No document exists with id: " +
|
||||
link.doc
|
||||
);
|
||||
}
|
||||
href = this.props.config.baseUrl + Metadata[id].permalink;
|
||||
} else if (link.page) {
|
||||
if (fs.existsSync(CWD + "/pages/en/" + link.page + ".js")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue