From e71b4d902ee54474ca5a85281b2646ee2ef49b31 Mon Sep 17 00:00:00 2001 From: Eric Nakagawa Date: Mon, 25 Sep 2017 11:26:15 -0700 Subject: [PATCH 1/3] Provide a more useful error in event someone tries to build site but hasn't provided localized files --- lib/core/nav/HeaderNav.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/core/nav/HeaderNav.js b/lib/core/nav/HeaderNav.js index 75b0e0f9fb..9276b3d910 100644 --- a/lib/core/nav/HeaderNav.js +++ b/lib/core/nav/HeaderNav.js @@ -136,6 +136,13 @@ class HeaderNav extends React.Component { link.doc; } if (!Metadata[id]) { + if (id != link.doc) { + throw new Error( + "It looks like you've enabled language support, but haven't provided translated files. The document with id: '" + + id + + "' doesn't exist." + ); + } throw new Error( "A headerLink is specified with a document that does not exist. No document exists with id: " + link.doc From a86af92e7c33d97435da7670d89aa58f905d84a0 Mon Sep 17 00:00:00 2001 From: Eric Nakagawa Date: Mon, 25 Sep 2017 11:34:57 -0700 Subject: [PATCH 2/3] Remove customCssFileName as any css file in /static/css gets appended to end of main.css --- examples/basics/siteConfig.js | 2 -- lib/core/Head.js | 5 ----- website/siteConfig.js | 1 - 3 files changed, 8 deletions(-) diff --git a/examples/basics/siteConfig.js b/examples/basics/siteConfig.js index 2f93a1713f..accc9e4abf 100644 --- a/examples/basics/siteConfig.js +++ b/examples/basics/siteConfig.js @@ -34,8 +34,6 @@ const siteConfig = { headerIcon: "img/docusaurus.svg", footerIcon: "img/docusaurus.svg", favicon: "img/favicon.png", - /* the name of your custom css file that resides in static/css/ */ - // customCssFileName: "custom.css", /* colors for website */ colors: { primaryColor: "#2E8555", diff --git a/lib/core/Head.js b/lib/core/Head.js index 9135b29bd7..983591e6b2 100644 --- a/lib/core/Head.js +++ b/lib/core/Head.js @@ -43,11 +43,6 @@ class Head extends React.Component { rel="stylesheet" href={this.props.config.baseUrl + "css/main.css"} /> - {this.props.config.customCssFileName && - }