Deploy website

Deploy website version based on 6f820d6453
This commit is contained in:
Website Deployment Script 2018-12-24 03:35:13 +00:00
parent 0797ae0921
commit ffbd59d4e2
266 changed files with 2418 additions and 2418 deletions
docs/zh-CN
1.0.11
1.0.12
1.0.13
1.0.14
1.0.15
1.1.0
1.1.1
1.1.2
1.1.3
1.1.4

View file

@ -74,7 +74,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>padding</td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -82,7 +82,7 @@
<tr><td>className</td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -95,7 +95,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>align</td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -107,7 +107,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>title</td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -118,7 +118,7 @@
<tr><td>imageLink</td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -74,7 +74,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>padding</td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -82,7 +82,7 @@
<tr><td>className</td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -95,7 +95,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>align</td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -107,7 +107,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>title</td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -118,7 +118,7 @@
<tr><td>imageLink</td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.11/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.11/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.11/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.11/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.11/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.11/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.11/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.11/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.11/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.11/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.11/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.11/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.11/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.11/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's &quot;html&quot; directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="using-github-pages"></a><a href="#using-github-pages" 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>Using GitHub Pages</h3>
<p>While choosing a web server or host is outside Docusaurus' scope, Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: <a href="https://pages.github.com/">GitHub Pages</a>.</p>

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.11/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.11/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's &quot;html&quot; directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="using-github-pages"></a><a href="#using-github-pages" 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>Using GitHub Pages</h3>
<p>While choosing a web server or host is outside Docusaurus' scope, Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: <a href="https://pages.github.com/">GitHub Pages</a>.</p>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.11/installation">installation</a> and <a href="/docs/zh-CN/1.0.11/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.11/installation">installation</a> <a href="/docs/zh-CN/1.0.11/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.11/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.11/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.11/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -100,7 +100,7 @@
yarn run start # or `npm run start`
# navigate to http://localhost:3000</code></pre></li>
</ol>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.11/installation">installation</a> and <a href="/docs/zh-CN/1.0.11/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.11/installation">installation</a> <a href="/docs/zh-CN/1.0.11/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.11/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.11/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.11/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -100,7 +100,7 @@
yarn run start # or `npm run start`
# navigate to http://localhost:3000</code></pre></li>
</ol>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.11/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.11/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.11"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.12/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.12/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.12/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.12/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.12/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.12/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.12/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.12/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.12/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.12/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.12/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.12/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.12/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.12/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="using-github-pages"></a><a href="#using-github-pages" 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>Using GitHub Pages</h3>
<p>While choosing a web server or host is outside Docusaurus' scope, Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: <a href="https://pages.github.com/">GitHub Pages</a>.</p>
@ -74,7 +74,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.12/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -88,7 +88,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -97,7 +97,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.12/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.12/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="using-github-pages"></a><a href="#using-github-pages" 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>Using GitHub Pages</h3>
<p>While choosing a web server or host is outside Docusaurus' scope, Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: <a href="https://pages.github.com/">GitHub Pages</a>.</p>
@ -74,7 +74,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.12/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -88,7 +88,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -97,7 +97,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.12/installation">installation</a> and <a href="/docs/zh-CN/1.0.12/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.12/installation">installation</a> <a href="/docs/zh-CN/1.0.12/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.12/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.12/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.12/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -100,7 +100,7 @@
yarn run start # or `npm run start`
# navigate to http://localhost:3000</code></pre></li>
</ol>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.12/installation">installation</a> and <a href="/docs/zh-CN/1.0.12/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.12/installation">installation</a> <a href="/docs/zh-CN/1.0.12/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.12/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.12/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.12/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -100,7 +100,7 @@
yarn run start # or `npm run start`
# navigate to http://localhost:3000</code></pre></li>
</ol>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.12/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.12/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.12"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.13/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.13/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.13/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.13/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.13/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.13/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.13/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.13/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.13/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.13/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.13/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.13/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.13/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.13/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="using-github-pages"></a><a href="#using-github-pages" 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>Using GitHub Pages</h3>
<p>While choosing a web server or host is outside Docusaurus' scope, Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: <a href="https://pages.github.com/">GitHub Pages</a>.</p>
@ -74,7 +74,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.13/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -88,7 +88,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -97,7 +97,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.13/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.13/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="using-github-pages"></a><a href="#using-github-pages" 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>Using GitHub Pages</h3>
<p>While choosing a web server or host is outside Docusaurus' scope, Docusaurus was designed to work really well with one of the most popular hosting solutions for open source projects: <a href="https://pages.github.com/">GitHub Pages</a>.</p>
@ -74,7 +74,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.13/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -88,7 +88,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -97,7 +97,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.13/installation">installation</a> and <a href="/docs/zh-CN/1.0.13/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.13/installation">installation</a> <a href="/docs/zh-CN/1.0.13/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.13/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.13/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.13/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -100,7 +100,7 @@
yarn run start # or `npm run start`
# navigate to http://localhost:3000</code></pre></li>
</ol>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.13/installation">installation</a> and <a href="/docs/zh-CN/1.0.13/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.13/installation">installation</a> <a href="/docs/zh-CN/1.0.13/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.13/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.13/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.13/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -100,7 +100,7 @@
yarn run start # or `npm run start`
# navigate to http://localhost:3000</code></pre></li>
</ol>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.13/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.13/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.13"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs">&lt;GridBlock
align=&quot;center&quot;
layout=&quot;threeColumn&quot;

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.14/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.14/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.14/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.14/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.14/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.14/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.14/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.14/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.14/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.14/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.14/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.14/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.14/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.14/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -79,7 +79,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.14/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -93,7 +93,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -102,7 +102,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,13 +56,13 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.14/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.14/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs">yarn 运行 `build` # 或者 `npm run build`
<pre><code class="hljs">yarn run build # 或是 `npm run build`
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -79,7 +79,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.14/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -93,7 +93,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -102,7 +102,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.14/installation">installation</a> and <a href="/docs/zh-CN/1.0.14/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.14/installation">installation</a> <a href="/docs/zh-CN/1.0.14/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.14/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.14/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.14/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -128,7 +128,7 @@
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.0.14/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.14/installation">installation</a> and <a href="/docs/zh-CN/1.0.14/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.14/installation">installation</a> <a href="/docs/zh-CN/1.0.14/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
└── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.14/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.14/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.14/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs"> ---
@ -128,7 +128,7 @@
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.0.14/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.14/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.14/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.14"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs">npm 运行示例翻译
<pre><code class="hljs">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs">yarn运行示例翻译
<pre><code class="hljs">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs">pages/en/help-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.15/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.15/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.15/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.15/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.15/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.15/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -82,19 +82,19 @@
<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>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-build"></a><a href="#docusaurus-build" 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><code>docusaurus-build</code></h3>
<p>别名︰ <code>build</code></p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>See also <a href="/docs/zh-CN/1.0.15/commands#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" 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><code>docusaurus-examples [feature]</code></h3>
<p>别名:<code>examples</code></p>
<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/1.0.15/site-preparation">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.0.15/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。 指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.15/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.0.15/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p>e.g.,</p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
@ -102,7 +102,7 @@
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -129,7 +129,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.0.15/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version-currentversion-newversion"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start-port-number"><code>docusaurus-start [--port ]</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.15/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.15/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.15/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.0.15/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.0.15/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.0.15/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.15/installation">installation</a> and <a href="/docs/zh-CN/1.0.15/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.15/installation">installation</a> <a href="/docs/zh-CN/1.0.15/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.15/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.15/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.15/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.0.15/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.0.15/installation">installation</a> and <a href="/docs/zh-CN/1.0.15/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.0.15/installation">installation</a> <a href="/docs/zh-CN/1.0.15/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.0.15/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.0.15/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.0.15/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.0.15/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.0.15/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.0.15/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.0.15"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.0/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.0/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.0/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.0/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.0/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.0/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.0/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.0/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.0/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.0/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.0/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.0/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.0/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.0/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.0/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.0/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.0/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.0/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.0/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.0/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.0/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.0/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.0/installation">installation</a> and <a href="/docs/zh-CN/1.1.0/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.0/installation">installation</a> <a href="/docs/zh-CN/1.1.0/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.0/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.0/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.0/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.0/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.0/installation">installation</a> and <a href="/docs/zh-CN/1.1.0/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.0/installation">installation</a> <a href="/docs/zh-CN/1.1.0/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.0/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.0/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.0/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.0/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.0/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.0"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.1/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.1/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.1/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.1/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.1/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.1/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.1/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.1/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.1/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.1/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.1/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.1/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.1/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.1/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.1/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.1/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.1/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.1/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.1/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.1/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.1/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.1/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.1/installation">installation</a> and <a href="/docs/zh-CN/1.1.1/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.1/installation">installation</a> <a href="/docs/zh-CN/1.1.1/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.1/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.1/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.1/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.1/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.1/installation">installation</a> and <a href="/docs/zh-CN/1.1.1/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.1/installation">installation</a> <a href="/docs/zh-CN/1.1.1/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.1/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.1/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.1/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.1/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.1/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.1/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.1"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.2/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.2/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.2/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.2/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.2/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.2/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.2/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.2/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.2/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.2/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.2/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.2/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.2/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.2/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.2/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.2/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.2/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.2/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.2/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.2/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.2/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.2/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.2/installation">installation</a> and <a href="/docs/zh-CN/1.1.2/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.2/installation">installation</a> <a href="/docs/zh-CN/1.1.2/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.2/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.2/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.2/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.2/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.2/installation">installation</a> and <a href="/docs/zh-CN/1.1.2/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.2/installation">installation</a> <a href="/docs/zh-CN/1.1.2/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.2/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.2/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.2/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.2/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.2/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.2/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.2"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.3/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.3/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.3/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.3/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.3/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.3/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.3/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.3/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.3/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.3/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.3/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.3/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.3/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.3/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.3/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.3/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.3/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.3/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.3/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.3/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.3/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.3/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.3/installation">installation</a> and <a href="/docs/zh-CN/1.1.3/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.3/installation">installation</a> <a href="/docs/zh-CN/1.1.3/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.3/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.3/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.3/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.3/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.3/installation">installation</a> and <a href="/docs/zh-CN/1.1.3/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.3/installation">installation</a> <a href="/docs/zh-CN/1.1.3/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.3/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.3/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.3/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.3/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.3/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.3/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.3"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -76,7 +76,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>padding</code></td><td>Array of <code>'all'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>, <code>'top'</code></td><td><code>[]</code></td><td>Positions of the padding.</td></tr>
@ -84,7 +84,7 @@
<tr><td><code>className</code></td><td>String</td><td>-</td><td>Custom class to add to the element.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Container</span>
<span class="token attr-name">padding</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">[</span><span class="token string">'bottom'</span><span class="token punctuation">,</span> <span class="token string">'top'</span><span class="token punctuation">]</span><span class="token punctuation">}</span></span>
<span class="token attr-name">background</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>light<span class="token punctuation">"</span></span>
@ -97,7 +97,7 @@
<p><strong>Props</strong></p>
<table>
<thead>
<tr><th>Prop</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Prop</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>align</code></td><td>One of <code>'left'</code>, <code>'center'</code>, <code>'right'</code></td><td><code>'left'</code></td><td>Text alignment of content.</td></tr>
@ -109,7 +109,7 @@
<p><strong>Content Object</strong></p>
<table>
<thead>
<tr><th>Key</th><th>Type</th><th>Default</th><th>Description</th></tr>
<tr><th>Key</th><th>Type</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>title</code></td><td>String</td><td>-</td><td>The display title of this section, which is parsed using Markdown</td></tr>
@ -120,7 +120,7 @@
<tr><td><code>imageLink</code></td><td>String</td><td>-</td><td>Link destination from clicking the image</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>GridBlock</span>
<span class="token attr-name">align</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>center<span class="token punctuation">"</span></span>
<span class="token attr-name">layout</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>threeColumn<span class="token punctuation">"</span></span>

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.4/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.4/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.4/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.4/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.4/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.4/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.4/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.4/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -84,44 +84,44 @@
<p>别名︰ <code>build</code></p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.</td></tr>
<tr><td><code>--skip-image-compression</code></td><td><code>false</code></td><td>忽略图片资源压缩。 通常都不会跳过图片资源压缩,除非你的图片资源已经优化过。</td></tr>
</tbody>
</table>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/zh-CN/1.1.4/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.1.4/commands#docusaurus-start"><code>docusaurus-start</code></a></p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-examples"></a><a href="#docusaurus-examples" 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><code>docusaurus-examples</code></h3>
<p>别名:<code>examples</code></p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</td></tr>
<tr><td><code>&lt;feature&gt;</code></td><td>-</td><td>指定附加功能 <code>translations</code> <code>versions</code>,以生成附加功能的额外文件。</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-examples &lt;feature&gt;
</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/1.1.4/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.1.4/site-preparation">Site Preparation guide</a> 中会深入介绍此命令。</p>
<hr>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-发布"></a><a href="#docusaurus-发布" 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><code>docusaurus-发布</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.4/commands#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<p>The following environment variables are generally set manually by the user in the CircleCI <code>config.yml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="docusaurus-publish"></a><a href="#docusaurus-publish" 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><code>docusaurus-publish</code></h3>
<p>别名: <code>publish-gh-pages</code></p>
<p><a href="/docs/zh-CN/1.1.4/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><p><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</p></li>
<li><p><code>GIT_USER</code>:与部署相关的 GIT 用户。</p></li>
<li><p><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</p>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">GIT_USER=docusaurus-bot USE_SSH=<span class="hljs-literal">true</span> yarn run publish-gh-pages
</code></pre></li>
</ul>
<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>
<li><code>CIRCLE_BRANCH</code>: 与触发 CI 运行的提交关联的 git 分支。</li>
<li><code>CIRCLE_BRANCH</code>:与触发 CI 运行的 commit 相关联的 git 分支。</li>
<li><code>CI_PULL_REQUEST</code>: 如果当前 CI 运行是通过请求中的提交触发的, 则认定为真。</li>
</ul>
<p>The following should be set by you in <code>siteConfig.js</code> as <code>organizationName</code> and <code>projectName</code>, respectively. If they are not set in your site configuration, they fall back to the <a href="https://circleci.com/docs/1.0/environment-variables/">CircleCI environment</a>.</p>
@ -136,14 +136,14 @@
<p>Renames an existing version of the docs to a new version name.</p>
<table>
<thead>
<tr><th>Arguments</th><th>Default</th><th>Description</th></tr>
<tr><th>参数</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>&lt;currentVersion&gt;</code></td><td>-</td><td>Version to be renamed.</td></tr>
<tr><td><code>&lt;newVersion&gt;</code></td><td>-</td><td>Version to be renamed to.</td></tr>
</tbody>
</table>
<p><strong>Example</strong></p>
<p><strong>示例</strong></p>
<pre><code class="hljs css language-bash">docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;
</code></pre>
<p>See the <a href="/docs/zh-CN/1.1.4/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This script will build the static website, apply translations if necessary, and then start a local server.</p>
<table>
<thead>
<tr><th>Options</th><th>Default</th><th>Description</th></tr>
<tr><th>可选项</th><th>默认</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>--port &lt;number&gt;</code></td><td><code>3000</code></td><td>The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.</td></tr>
@ -168,7 +168,7 @@
<h3><a class="anchor" aria-hidden="true" id="docusaurus-书写-翻译"></a><a href="#docusaurus-书写-翻译" 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><code>docusaurus-书写-翻译</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/zh-CN/1.1.4/translation">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-发布"><code>docusaurus-发布</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/doc-markdown"><span>Markdown Features</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#从命令行运行">从命令行运行</a></li><li><a href="#使用参数">使用参数</a></li><li><a href="#配置">配置</a></li><li><a href="#命令">命令</a></li><li><a href="#参考">参考</a><ul class="toc-headings"><li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li><li><a href="#docusaurus-examples"><code>docusaurus-examples</code></a></li><li><a href="#docusaurus-publish"><code>docusaurus-publish</code></a></li><li><a href="#docusaurus-rename-version"><code>docusaurus-rename-version</code></a></li><li><a href="#docusaurus-start"><code>docusaurus-start</code></a></li><li><a href="#docusaurus-版本-版本"><code>docusaurus-版本</code></a></li><li><a href="#docusaurus-书写-翻译"><code>docusaurus-书写-翻译</code></a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.4/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.4/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.4/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -56,14 +56,14 @@
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Publishing your site</h1></header><article><div><span><p>现在, 您应该有一个 <a href="/docs/zh-CN/1.1.4/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.1.4/site-config"> 自定义 </a> 的喜好, 就该发布它了。 Docusaurus 生成一个静态 HTML 网站, 它可以由您喜爱的 web 服务器或在线托管解决方案提供服务。</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页"></a><a href="#构建静态-html-页" 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>构建静态 HTML 页</h2>
<p>要创建网站的静态生成, 请从 <code>网站</code> 目录中运行以下脚本:</p>
<pre><code class="hljs css language-bash">yarn 运行 `build` <span class="hljs-comment"># 或 `npm run build`</span>
<pre><code class="hljs css language-bash">yarn run build <span class="hljs-comment"># 或 `npm run build`</span>
</code></pre>
<p>This will generate a <code>build</code> folder inside the <code>website</code> directory containing the <code>.html</code> files from all of your docs and other pages included in <code>pages</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="构建静态-html-页-1"></a><a href="#构建静态-html-页-1" 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>构建静态 HTML 页</h2>
<p>At this point, you can grab all of the files inside the <code>website/build</code> folder and copy them over to your favorite web server's <code>html</code> directory.</p>
<blockquote>
<p>For example, both Apache and nginx serve content from <code>/var/www/html</code> by default. That said, choosing a web server or provider is outside the scope of Docusaurus.</p>
<p>When serving the site from your own web server, ensure the web server is serving the asset files with the proper HTTP headers. CSS files should be served with the <code>content-type</code> header of <code>text/css</code>. In the case of nginx, this would mean setting <code>include /etc/nginx/mime.types;</code> in your <code>nginx.conf</code> file. See <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a> for more info.</p>
<p>例如Apache 和 Nginx 默认都从 <code>/var/www/html</code> 提供内容。 也就是说,选择 web 服务端或提供相应服务都超出了Docusaurus 的范围。</p>
<p>当您使用自己的 web 服务端时,请确保 web 服务端使用了合适的 HTTP headers 为静态资源文件提供服务。 CSS 文件 header 中的 <code>content-type</code> 应该是 <code>text/css</code>。 以 nginx 为例,你需要在 <code>nginx.conf</code> 文件中设置 <code>include /etc/nginx/mime.types;</code>。 更多信息请参阅 <a href="https://github.com/facebook/Docusaurus/issues/602">this issue</a></p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="hosting-on-a-service"></a><a href="#hosting-on-a-service" 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>Hosting on a Service:</h3>
<ul>
@ -80,7 +80,7 @@
<p>Two of the required parameters are set in the <a href="/docs/zh-CN/1.1.4/site-config"><code>siteConfig.js</code></a>:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>organizationName</code></td><td>The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebook&quot; GitHub organization.</td></tr>
@ -94,7 +94,7 @@
<p>One of the required parameters is set as a environment variable:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GIT_USER</code></td><td>The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</td></tr>
@ -103,7 +103,7 @@
<p>There are also two optional parameters that are set as environment variables:</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>USE_SSH</code></td><td>If this is set to <code>true</code>, then SSH is used instead of HTTPS for the connection to the GitHub repo. HTTPS is the default if this variable is not set.</td></tr>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.4/installation">installation</a> and <a href="/docs/zh-CN/1.1.4/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.4/installation">installation</a> <a href="/docs/zh-CN/1.1.4/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.4/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.4/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.4/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.4/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Creating your site · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Creating your site · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 旨在让您的开源项目创建文档和网站变得更简单&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,10 +53,10 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus was created to hopefully make it super simple for you to create a site and documentation for your open source project.</p>
<p>After <a href="/docs/zh-CN/1.1.4/installation">installation</a> and <a href="/docs/zh-CN/1.1.4/site-preparation">preparation</a>, much of the work to create a basic site for your docs is already complete.</p>
<h2><a class="anchor" aria-hidden="true" id="site-structure"></a><a href="#site-structure" 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>Site Structure</h2>
<p>Your site structure looks like the following:</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Creating your site</h1></header><article><div><span><p>Docusaurus 旨在让您的开源项目创建文档和网站变得更简单。</p>
<p> <a href="/docs/zh-CN/1.1.4/installation">installation</a> <a href="/docs/zh-CN/1.1.4/site-preparation">preparation</a> 之后,为您的文档创建基础站点的工作大部分已完成。</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>您的网站结构如下所示:</p>
<pre><code class="hljs css language-bash">root-of-repo
├── docs
├── website
@ -71,14 +71,14 @@
│ └── static
</code></pre>
<blockquote>
<p>This assumes that you removed the example <code>.md</code> files that were installed with the <a href="/docs/zh-CN/1.1.4/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.1.4/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> folder as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> folder.</p>
<blockquote>
<p>The blog posts must be formatted as <code>YYYY-MM-DD-your-file-name.md</code></p>
<p>博客的文章格式应统一为 <code>YYYY-MM-DD-your-file-name.md</code></p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="create-your-basic-site"></a><a href="#create-your-basic-site" 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>Create Your Basic Site</h2>
<p>To create a fully functional site, you only need to do a few steps:</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>创建一个功能齐备的网站,你只需要以下几步:</p>
<ol>
<li><p>Add your documentation to the <code>/docs</code> folder as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.1.4/doc-markdown#documents">header</a> in each file. The simplest header would be the following, where <code>id</code> is the link name (e.g., <code>docs/intro.html</code>) and the <code>title</code>, is, of course, the title of the browser page.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
@ -128,7 +128,7 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="blog-only"></a><a href="#blog-only" 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>Blog Only</h3>
<p>You can also use Docusaurus to host your <a href="/docs/zh-CN/1.1.4/adding-blog#i-want-to-run-in-blog-only-mode">blog only</a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#site-structure">Site Structure</a></li><li><a href="#create-your-basic-site">Create Your Basic Site</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.1.4/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.1.4/publishing"><span>Publishing your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#站点结构">站点结构</a></li><li><a href="#创建您的基础站点">创建您的基础站点</a></li><li><a href="#special-customization">Special Customization</a><ul class="toc-headings"><li><a href="#docs-landing-page">Docs Landing Page</a></li><li><a href="#blog-only">Blog Only</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
/docs/zh-CN/installation">Getting Started</a><a href="
/docs/zh-CN/versioning">Versioning</a><a href="
/docs/zh-CN/translation">Localization</a><a href="

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus allows for easy translation functionality using &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt;. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta name="docsearch:version" content="1.1.4"/><meta name="docsearch:language" content="zh-CN"/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="&lt;p&gt;Docusaurus 借助 &lt;a href=&quot;https://crowdin.com/&quot;&gt;Crowdin&lt;/a&gt; 可以非常简单的实现翻译功能 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译 用英文字符串编写的顶级网页可以通过在&lt;code&gt;&amp;lt;translate&amp;gt;&lt;/code&gt;标记中打包任何要翻译的字符串来进行翻译 其他标题和标签也会被发现和正确翻译&lt;/p&gt;
"/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -53,13 +53,13 @@
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/zh-CN" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus 借助 <a href="https://crowdin.com/">Crowdin</a> 可以非常简单的实现翻译功能。 用英文写的文档文件会被上传到 Crowdin, 供社区内的用户翻译。 用英文字符串编写的顶级网页可以通过在<code>&lt;translate&gt;</code>标记中打包任何要翻译的字符串来进行翻译。 其他标题和标签也会被发现和正确翻译。</p>
<h2><a class="anchor" aria-hidden="true" id="docusaurus-翻译配置"></a><a href="#docusaurus-翻译配置" 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>Docusaurus 翻译配置</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css language-bash">npm 运行示例翻译
<pre><code class="hljs css language-bash">npm run examples translations
</code></pre>
<p></p>
<pre><code class="hljs css language-bash">yarn运行示例翻译
<pre><code class="hljs css language-bash">yarn examples translations
</code></pre>
<p>这会创建以下文件:</p>
<pre><code class="hljs css language-bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js

Some files were not shown because too many files have changed in this diff Show more