From 9d9c043c469c06a9f5a35cee3016d9a5e7233be3 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Thu, 26 May 2022 20:58:56 +0800 Subject: [PATCH] add docs --- packages/docusaurus/bin/docusaurus.mjs | 5 ++++- website/docs/cli.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/bin/docusaurus.mjs b/packages/docusaurus/bin/docusaurus.mjs index 7a4b21836e58..8ae3d348ecf6 100755 --- a/packages/docusaurus/bin/docusaurus.mjs +++ b/packages/docusaurus/bin/docusaurus.mjs @@ -148,7 +148,10 @@ cli .option('-p, --port ', 'use specified port (default: 3000)') .option('--build', 'build website before serving (default: false)') .option('-h, --host ', 'use specified host (default: localhost)') - .option('--no-open', 'do not open page in the browser (default: false)') + .option( + '--no-open', + 'do not open page in the browser (default: false, or true in CI)', + ) .action(async (siteDir, options) => serve(await resolveDir(siteDir), options), ); diff --git a/website/docs/cli.md b/website/docs/cli.md index e19840601722..c1b79ddd9d87 100644 --- a/website/docs/cli.md +++ b/website/docs/cli.md @@ -150,6 +150,7 @@ Serve your built website locally. | `--build` | `false` | Build website before serving | | `--config` | `undefined` | Path to docusaurus config file, default to `[siteDir]/docusaurus.config.js` | | `--host` | `localhost` | Specify a host to use. For example, if you want your server to be accessible externally, you can use `--host 0.0.0.0`. | +| `--no-open` | `false` locally, `true` in CI | Do not open a browser window to the server location. | ### `docusaurus clear [siteDir]` {#docusaurus-clear-sitedir}