diff --git a/admin/testing-changes-on-Docusaurus-itself.md b/admin/testing-changes-on-Docusaurus-itself.md index 3a29a4a8ca..db88b29841 100644 --- a/admin/testing-changes-on-Docusaurus-itself.md +++ b/admin/testing-changes-on-Docusaurus-itself.md @@ -13,7 +13,7 @@ cd website npm run start ``` -If you look in the `website/package.json` file, you will notice that running `start` with `npm run` actually loads the local `start-server.js` file. This is how you know you are running with local code. +> If you look in the `website/package.json` file, you will notice that running `start` with `npm run` actually executes the local `start-server.js` file. This is how you know you are running with local code. ### Observing changes diff --git a/lib/server/readMetadata.js b/lib/server/readMetadata.js index 33483c042f..cf6a066451 100644 --- a/lib/server/readMetadata.js +++ b/lib/server/readMetadata.js @@ -81,7 +81,8 @@ function readSidebar() { // split markdown header function splitHeader(content) { - const lines = content.split('\n'); + // New line characters need to handle all operating systems. + const lines = content.split(/\r?\n/); if (lines[0] !== '---') { return {}; } diff --git a/website/languages.js b/website/languages.js index 01e7c50df8..12512f66bb 100644 --- a/website/languages.js +++ b/website/languages.js @@ -176,6 +176,10 @@ const languages = [ name: "中文", tag: "zh-Hans" }, - { enabled: false, name: "繁體中文", tag: "zh-Hant" } + { + enabled: false, + name: "繁體中文", + tag: "zh-Hant" + } ]; module.exports = languages; diff --git a/website/package.json b/website/package.json index 1a4be8973f..45a6f212b2 100644 --- a/website/package.json +++ b/website/package.json @@ -1,12 +1,12 @@ { "scripts": { - "start": "../lib/start-server.js", - "build": "../lib/build-files.js", - "publish-gh-pages": "../lib/publish-gh-pages.js", - "examples": "../lib/copy-examples.js", - "write-translations": "../lib/write-translations.js", - "version": "../lib/version.js", - "rename-version": "../lib/rename-version.js", + "start": "node ../lib/start-server.js", + "build": "node ../lib/build-files.js", + "publish-gh-pages": "node ../lib/publish-gh-pages.js", + "examples": "node ../lib/copy-examples.js", + "write-translations": "node ../lib/write-translations.js", + "version": "node ../lib/version.js", + "rename-version": "node ../lib/rename-version.js", "crowdin-upload": "crowdin-cli --config ../crowdin.yaml upload sources --auto-update -b master", "crowdin-download": "crowdin-cli --config ../crowdin.yaml download -b master" },