mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 02:56:57 +02:00
parent
daf63274f7
commit
5d4d0d0423
2334 changed files with 12240 additions and 12240 deletions
|
@ -54,18 +54,18 @@
|
|||
</ul>
|
||||
<h2><a class="anchor" aria-hidden="true" id="从命令行运行"></a><a href="#从命令行运行" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>从命令行运行</h2>
|
||||
<p>这些脚本可以使用 Yarn 或 npm 来运行。 如果您已经完成了我们的入门指南, 您可能已经熟悉了 <code>start</code> 命令。 这是这样的命令,:它告诉 Docusaurus 运行 <code>Docusaurus-start</code> 脚本, 它生成站点并启动服务器, 通常是这样调用的:</p>
|
||||
<pre><code class="hljs css languages- bash">yarn run start
|
||||
<pre><code class="hljs css languages-bash">yarn run start
|
||||
</code></pre>
|
||||
<p>也可以使用 npm 调用相同的脚本:</p>
|
||||
<pre><code class="hljs css languages- bash">npm run start
|
||||
<pre><code class="hljs css languages-bash">npm run start
|
||||
</code></pre>
|
||||
<p>若要运行特定的脚本, 只需用与脚本关联的命令替换上面示例中的 <code>start</code> 命令。</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="使用参数"></a><a href="#使用参数" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>使用参数</h2>
|
||||
<p>Some commands support optional arguments. For example, to start a server on port 8080, you can specify the <code>--port</code> argument when running <code>start</code>:</p>
|
||||
<pre><code class="hljs css languages- bash">yarn run start -- port 8080
|
||||
<pre><code class="hljs css languages-bash">yarn run start -- port 8080
|
||||
</code></pre>
|
||||
<p>如果使用 npm 运行 Docusaurus, 则仍然可以通过在 <code>npm run <command></code> 和命令参数之间插入 <code>--</code> 来使用命令行参数:</p>
|
||||
<pre><code class="hljs css languages- bash">npm run start -- --port 8080
|
||||
<pre><code class="hljs css languages-bash">npm run start -- --port 8080
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="配置"></a><a href="#配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>配置</h2>
|
||||
<p>这些脚本是在 <code>website/package.json</code> 文件的 <code>"scripts"</code> 项下设置的, 作为安装过程的一部分。 如果需要帮助再次设置它们, 请参阅 <a href="/docs/zh-CN/next/installation"> 安装指南 </a>。</p>
|
||||
|
@ -98,7 +98,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<p><strong>Example</strong></p>
|
||||
<pre><code class="hljs css languages- bash">docusaurus-examples <feature>
|
||||
<pre><code class="hljs css languages-bash">docusaurus-examples <feature>
|
||||
</code></pre>
|
||||
<p>When no feature is specified, sets up a minimally configured example website in your project. This command is covered in depth in the <a href="/docs/zh-CN/next/site-preparation">Site Preparation guide</a>.</p>
|
||||
<hr>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<li><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</li>
|
||||
</ul>
|
||||
<p><strong>Example</strong></p>
|
||||
<pre><code class="hljs css languages- bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
|
||||
<pre><code class="hljs css languages-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
|
||||
</code></pre>
|
||||
<p>The following environment variables are <a href="https://circleci.com/docs/1.0/environment-variables/">set by CircleCI</a> during the build process.</p>
|
||||
<ul>
|
||||
|
@ -138,7 +138,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<p><strong>Example</strong></p>
|
||||
<pre><code class="hljs css languages- bash">docusaurus-rename-version <currentVersion> <newVersion>
|
||||
<pre><code class="hljs css languages-bash">docusaurus-rename-version <currentVersion> <newVersion>
|
||||
</code></pre>
|
||||
<p>See the <a href="/docs/zh-CN/next/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
|
||||
<hr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue