mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
Fixes to testing guide (for Windows only) (#304)
* Fixes to testing guide (for Windows only) * Fixed line ending detection for UNIX and Windows * Removed incorrect instructions about translations * Removed redudant heading and turned it into a note.
This commit is contained in:
parent
1db69285e5
commit
21cbece838
4 changed files with 15 additions and 10 deletions
|
@ -13,7 +13,7 @@ cd website
|
||||||
npm run start
|
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
|
### Observing changes
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,8 @@ function readSidebar() {
|
||||||
|
|
||||||
// split markdown header
|
// split markdown header
|
||||||
function splitHeader(content) {
|
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] !== '---') {
|
if (lines[0] !== '---') {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,10 @@ const languages = [
|
||||||
name: "中文",
|
name: "中文",
|
||||||
tag: "zh-Hans"
|
tag: "zh-Hans"
|
||||||
},
|
},
|
||||||
{ enabled: false, name: "繁體中文", tag: "zh-Hant" }
|
{
|
||||||
|
enabled: false,
|
||||||
|
name: "繁體中文",
|
||||||
|
tag: "zh-Hant"
|
||||||
|
}
|
||||||
];
|
];
|
||||||
module.exports = languages;
|
module.exports = languages;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "../lib/start-server.js",
|
"start": "node ../lib/start-server.js",
|
||||||
"build": "../lib/build-files.js",
|
"build": "node ../lib/build-files.js",
|
||||||
"publish-gh-pages": "../lib/publish-gh-pages.js",
|
"publish-gh-pages": "node ../lib/publish-gh-pages.js",
|
||||||
"examples": "../lib/copy-examples.js",
|
"examples": "node ../lib/copy-examples.js",
|
||||||
"write-translations": "../lib/write-translations.js",
|
"write-translations": "node ../lib/write-translations.js",
|
||||||
"version": "../lib/version.js",
|
"version": "node ../lib/version.js",
|
||||||
"rename-version": "../lib/rename-version.js",
|
"rename-version": "node ../lib/rename-version.js",
|
||||||
"crowdin-upload": "crowdin-cli --config ../crowdin.yaml upload sources --auto-update -b master",
|
"crowdin-upload": "crowdin-cli --config ../crowdin.yaml upload sources --auto-update -b master",
|
||||||
"crowdin-download": "crowdin-cli --config ../crowdin.yaml download -b master"
|
"crowdin-download": "crowdin-cli --config ../crowdin.yaml download -b master"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue