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

View file

@ -56,7 +56,7 @@
</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">Pages and Styles</h1></header><article><div><span><p>Docusaurus provides support for writing pages as React components inside the <code>website/pages</code> directory which will share the same header, footer, and styles as the rest of the site.</p>
<h2><a class="anchor" aria-hidden="true" id="provided-props"></a><a href="#provided-props" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Provided Props</h2>
<p>Docusaurus provides your <a href="/docs/zh-CN/1.6.0/site-config">siteConfig.js</a> as a <code>config</code> props. Hence, you can access <code>baseUrl</code> or <code>title</code> through this props.</p>
<p>Example</p>
<p>示例</p>
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> React = <span class="hljs-built_in">require</span>(<span class="hljs-string">'react'</span>);
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyPage</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
@ -124,7 +124,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -132,7 +132,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -145,7 +145,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -157,7 +157,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -168,7 +168,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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

@ -56,7 +56,7 @@
</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">Pages and Styles</h1></header><article><div><span><p>Docusaurus provides support for writing pages as React components inside the <code>website/pages</code> directory which will share the same header, footer, and styles as the rest of the site.</p>
<h2><a class="anchor" aria-hidden="true" id="provided-props"></a><a href="#provided-props" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Provided Props</h2>
<p>Docusaurus provides your <a href="/docs/zh-CN/1.6.0/site-config">siteConfig.js</a> as a <code>config</code> props. Hence, you can access <code>baseUrl</code> or <code>title</code> through this props.</p>
<p>Example</p>
<p>示例</p>
<pre><code class="hljs css language-js"><span class="hljs-keyword">const</span> React = <span class="hljs-built_in">require</span>(<span class="hljs-string">'react'</span>);
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyPage</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
@ -124,7 +124,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -132,7 +132,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -145,7 +145,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -157,7 +157,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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>
@ -168,7 +168,7 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<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.6.0/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.6.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.6.0/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.6.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.6.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.6.0/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</li>
<li><code>GIT_USER</code>:与部署相关的 GIT 用户。</li>
<li><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</li>
</ul>
<p><strong>Example</strong></p>
<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>
<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.6.0/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This command 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>
@ -172,7 +172,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.6.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.6.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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.6.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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.6.0/commands#docusaurus-start"><code>docusaurus-start</code></a>.</p>
<p>生成静态站点,必要时会应用翻译。 适用于部署前构建站点。</p>
<p>另请参阅 <a href="/docs/zh-CN/1.6.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.6.0/site-preparation">Site Preparation guide</a>.</p>
<p>如果没有指定附加功能,则会在你的项目中设置一个最小化配置的示例站点。 <a href="/docs/zh-CN/1.6.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.6.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.6.0/commands#docusaurus-build">Builds</a>,然后在 GitHub Pages 上部署静态网站。 此命令会在 Circle CI 部署步骤中运行,因此需要定义一些环境变量:</p>
<p>以下环境变量通常由用户在 CircleCI 的 <code>config.yml</code> 文件中手动设置。</p>
<ul>
<li><code>GIT_USER</code>: 与部署提交联系的 GIT 用户。</li>
<li><code>GIT_USER</code>:与部署相关的 GIT 用户。</li>
<li><code>USE_SSH</code>: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.</li>
</ul>
<p><strong>Example</strong></p>
<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>
<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.6.0/versioning#renaming-existing-versions">Versioning guide</a> to learn more.</p>
@ -153,7 +153,7 @@
<p>This command 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>
@ -172,7 +172,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.6.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.6.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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.6.0/versioning"><span class="arrow-prev"></span><span>Versioning</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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

@ -112,7 +112,7 @@
yarn start (or npm run start)
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="updating-your-docusaurus-version"></a><a href="#updating-your-docusaurus-version" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Updating Your Docusaurus Version</h2>
<p>At any time after Docusaurus is installed, you can check your current version of Docusaurus by going into the <code>website</code> directory and typing <code>yarn outdated docusaurus</code> or <code>npm outdated docusaurus</code>.</p>
<p>在 Docusaurus 安装之后,你可以在 <code>website</code> 目录下查看最新版本,或是输入 <code>yarn outdated docusaurus</code> <code>npm outdated docusaurus</code> 查看。</p>
<p>You will see something like this:</p>
<pre><code class="hljs">$ yarn outdated
Using globally installed version of Yarn
@ -128,7 +128,7 @@ docusaurus 1.0.9 1.2.0 1.2.0 devDependencies https://github.com/facebook/Doc
✨ Done in 0.41s.
</code></pre>
<blockquote>
<p>If there is no noticeable version output from the <code>outdated</code> commands, then you are up-to-date.</p>
<p>如果 <code>outdated</code> 命令没有任何版本过期的通知,那你就处于最新版本。</p>
</blockquote>
<p>You can update to the <a href="https://www.npmjs.com/package/docusaurus">latest version</a> of Docusaurus by:</p>
<pre><code class="hljs">yarn upgrade docusaurus --latest
@ -137,7 +137,7 @@ docusaurus 1.0.9 1.2.0 1.2.0 devDependencies https://github.com/facebook/Doc
<pre><code class="hljs">npm update docusaurus
</code></pre>
<blockquote>
<p>If you are finding that you are getting errors after your upgrade, try to either clear your Babel cache (usually it's in a <a href="https://babeljs.io/docs/en/babel-register/#environment-variables">temporary directory</a> or run the Docusaurus server (e.g., <code>yarn start</code>) with the <code>BABEL_DISABLE_CACHE=1</code> environment configuration.</p>
<p>如果你在升级后发现任何错误,请尝试清除你的 Babel 缓存。通常在 <a href="https://babeljs.io/docs/en/babel-register/#environment-variables">temporary directory</a>,或是在 <code>BABEL_DISABLE_CACHE=1</code> 的配置下运行 Docusaurus 服务(如:<code>yarn start</code>)。</p>
</blockquote>
</span></div></article></div><div class="docs-prevnext"><a class="docs-next button" href="/docs/zh-CN/1.6.0/site-preparation"><span>Site Preparation</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#安装-docusaurus">安装 Docusaurus</a></li><li><a href="#验证安装">验证安装</a></li><li><a href="#运行示例网站">运行示例网站</a><ul class="toc-headings"><li><a href="#使用代理启动服务">使用代理启动服务</a></li></ul></li><li><a href="#updating-your-docusaurus-version">Updating Your Docusaurus Version</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="

View file

@ -112,7 +112,7 @@
yarn start (or npm run start)
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="updating-your-docusaurus-version"></a><a href="#updating-your-docusaurus-version" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Updating Your Docusaurus Version</h2>
<p>At any time after Docusaurus is installed, you can check your current version of Docusaurus by going into the <code>website</code> directory and typing <code>yarn outdated docusaurus</code> or <code>npm outdated docusaurus</code>.</p>
<p>在 Docusaurus 安装之后,你可以在 <code>website</code> 目录下查看最新版本,或是输入 <code>yarn outdated docusaurus</code> <code>npm outdated docusaurus</code> 查看。</p>
<p>You will see something like this:</p>
<pre><code class="hljs">$ yarn outdated
Using globally installed version of Yarn
@ -128,7 +128,7 @@ docusaurus 1.0.9 1.2.0 1.2.0 devDependencies https://github.com/facebook/Doc
✨ Done in 0.41s.
</code></pre>
<blockquote>
<p>If there is no noticeable version output from the <code>outdated</code> commands, then you are up-to-date.</p>
<p>如果 <code>outdated</code> 命令没有任何版本过期的通知,那你就处于最新版本。</p>
</blockquote>
<p>You can update to the <a href="https://www.npmjs.com/package/docusaurus">latest version</a> of Docusaurus by:</p>
<pre><code class="hljs">yarn upgrade docusaurus --latest
@ -137,7 +137,7 @@ docusaurus 1.0.9 1.2.0 1.2.0 devDependencies https://github.com/facebook/Doc
<pre><code class="hljs">npm update docusaurus
</code></pre>
<blockquote>
<p>If you are finding that you are getting errors after your upgrade, try to either clear your Babel cache (usually it's in a <a href="https://babeljs.io/docs/en/babel-register/#environment-variables">temporary directory</a> or run the Docusaurus server (e.g., <code>yarn start</code>) with the <code>BABEL_DISABLE_CACHE=1</code> environment configuration.</p>
<p>如果你在升级后发现任何错误,请尝试清除你的 Babel 缓存。通常在 <a href="https://babeljs.io/docs/en/babel-register/#environment-variables">temporary directory</a>,或是在 <code>BABEL_DISABLE_CACHE=1</code> 的配置下运行 Docusaurus 服务(如:<code>yarn start</code>)。</p>
</blockquote>
</span></div></article></div><div class="docs-prevnext"><a class="docs-next button" href="/docs/zh-CN/1.6.0/site-preparation"><span>Site Preparation</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#安装-docusaurus">安装 Docusaurus</a></li><li><a href="#验证安装">验证安装</a></li><li><a href="#运行示例网站">运行示例网站</a><ul class="toc-headings"><li><a href="#使用代理启动服务">使用代理启动服务</a></li></ul></li><li><a href="#updating-your-docusaurus-version">Updating Your Docusaurus Version</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="

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.6.0/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.6.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>这将在 <code>网站</code> 目录中生成一个 <code>&quot;生成&quot;</code> 目录, 其中包含 <code></code> 中包含的所有文档和其他页中所含的. html ` 文件。</p></p>
<p><h2>构建静态 HTML 页</h2></p>
<p>At this point, you can grab all of the files inside the <code>website/build` directory and copy them over to your favorite web server's `html` directory.
<p>这将在 <code>website</code> 目录下生成一个 <code>build</code> 文件夹, 其中包含 <code>website</code> 目录下所有文档和其他页面中所含的 <code>.html</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>此时,您会在 <code>website/build</code> 目录中得到所有的文件,并将它们复制到您青睐的 Web 服务器的 <code>html</code> 目录中。</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>
@ -85,7 +85,7 @@
</ol>
<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. If you are the owner, then it is your GitHub username. In the case of Docusaurus, that would be the &quot;<em>facebook</em>&quot; GitHub organization.</td></tr>
@ -113,7 +113,7 @@
</ol>
<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. The specified <code>GIT_USER</code> must have push access to the repository specified in the combination of <code>organizationName</code> and <code>projectName</code>.</td></tr>
@ -128,7 +128,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>
@ -254,14 +254,14 @@
<p>GitHub enterprise installations should work in the same manner as github.com; you only need to identify the organization's GitHub Enterprise host.</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GITHUB_HOST</code></td><td>The hostname for the GitHub enterprise server.</td></tr>
</tbody>
</table>
<p>Alter your <code>siteConfig.js</code> to add a property <code>'githubHost'</code> which represents the GitHub Enterprise hostname. Alternatively, set an environment variable <code>GITHUB_HOST</code> when executing the publish command.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.6.0/site-creation"><span class="arrow-prev"></span><span>Creating your site</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/docker"><span>Docker</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#构建静态-html-页">构建静态 HTML 页</a><ul class="toc-headings"><li><a href="#hosting-on-a-service">Hosting on a Service:</a></li><li><a href="#using-github-pages">Using GitHub Pages</a></li></ul></li><li><a href="#automating-deployments-using-continuous-integration">Automating Deployments Using Continuous Integration</a><ul class="toc-headings"><li><a href="#using-circle-ci-20">Using Circle CI 2.0</a></li><li><a href="#tips-tricks">Tips &amp; Tricks</a></li><li><a href="#using-travis-ci">Using Travis CI</a></li><li><a href="#hosting-on-netlify">Hosting on Netlify</a></li><li><a href="#publishing-to-github-enterprise">Publishing to GitHub Enterprise</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.6.0/site-creation"><span class="arrow-prev"></span><span>Creating your site</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/docker"><span>Docker</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#构建静态-html-页">构建静态 HTML 页</a></li><li><a href="#构建静态-html-页-1">构建静态 HTML 页</a><ul class="toc-headings"><li><a href="#hosting-on-a-service">Hosting on a Service:</a></li><li><a href="#using-github-pages">Using GitHub Pages</a></li></ul></li><li><a href="#automating-deployments-using-continuous-integration">Automating Deployments Using Continuous Integration</a><ul class="toc-headings"><li><a href="#using-circle-ci-20">Using Circle CI 2.0</a></li><li><a href="#tips-tricks">Tips &amp; Tricks</a></li><li><a href="#using-travis-ci">Using Travis CI</a></li><li><a href="#hosting-on-netlify">Hosting on Netlify</a></li><li><a href="#publishing-to-github-enterprise">Publishing to GitHub Enterprise</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.6.0/site-creation"> 站点, 并在本地运行 </a>。 一旦您有了 <a href="/docs/zh-CN/1.6.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>这将在 <code>网站</code> 目录中生成一个 <code>&quot;生成&quot;</code> 目录, 其中包含 <code></code> 中包含的所有文档和其他页中所含的. html ` 文件。</p></p>
<p><h2>构建静态 HTML 页</h2></p>
<p>At this point, you can grab all of the files inside the <code>website/build` directory and copy them over to your favorite web server's `html` directory.
<p>这将在 <code>website</code> 目录下生成一个 <code>build</code> 文件夹, 其中包含 <code>website</code> 目录下所有文档和其他页面中所含的 <code>.html</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>此时,您会在 <code>website/build</code> 目录中得到所有的文件,并将它们复制到您青睐的 Web 服务器的 <code>html</code> 目录中。</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>
@ -85,7 +85,7 @@
</ol>
<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. If you are the owner, then it is your GitHub username. In the case of Docusaurus, that would be the &quot;<em>facebook</em>&quot; GitHub organization.</td></tr>
@ -113,7 +113,7 @@
</ol>
<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. The specified <code>GIT_USER</code> must have push access to the repository specified in the combination of <code>organizationName</code> and <code>projectName</code>.</td></tr>
@ -128,7 +128,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>
@ -254,14 +254,14 @@
<p>GitHub enterprise installations should work in the same manner as github.com; you only need to identify the organization's GitHub Enterprise host.</p>
<table>
<thead>
<tr><th>Name</th><th>Description</th></tr>
<tr><th>Name</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>GITHUB_HOST</code></td><td>The hostname for the GitHub enterprise server.</td></tr>
</tbody>
</table>
<p>Alter your <code>siteConfig.js</code> to add a property <code>'githubHost'</code> which represents the GitHub Enterprise hostname. Alternatively, set an environment variable <code>GITHUB_HOST</code> when executing the publish command.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.6.0/site-creation"><span class="arrow-prev"></span><span>Creating your site</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/docker"><span>Docker</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#构建静态-html-页">构建静态 HTML 页</a><ul class="toc-headings"><li><a href="#hosting-on-a-service">Hosting on a Service:</a></li><li><a href="#using-github-pages">Using GitHub Pages</a></li></ul></li><li><a href="#automating-deployments-using-continuous-integration">Automating Deployments Using Continuous Integration</a><ul class="toc-headings"><li><a href="#using-circle-ci-20">Using Circle CI 2.0</a></li><li><a href="#tips-tricks">Tips &amp; Tricks</a></li><li><a href="#using-travis-ci">Using Travis CI</a></li><li><a href="#hosting-on-netlify">Hosting on Netlify</a></li><li><a href="#publishing-to-github-enterprise">Publishing to GitHub Enterprise</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.6.0/site-creation"><span class="arrow-prev"></span><span>Creating your site</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/docker"><span>Docker</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#构建静态-html-页">构建静态 HTML 页</a></li><li><a href="#构建静态-html-页-1">构建静态 HTML 页</a><ul class="toc-headings"><li><a href="#hosting-on-a-service">Hosting on a Service:</a></li><li><a href="#using-github-pages">Using GitHub Pages</a></li></ul></li><li><a href="#automating-deployments-using-continuous-integration">Automating Deployments Using Continuous Integration</a><ul class="toc-headings"><li><a href="#using-circle-ci-20">Using Circle CI 2.0</a></li><li><a href="#tips-tricks">Tips &amp; Tricks</a></li><li><a href="#using-travis-ci">Using Travis CI</a></li><li><a href="#hosting-on-netlify">Hosting on Netlify</a></li><li><a href="#publishing-to-github-enterprise">Publishing to GitHub Enterprise</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.6.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.6.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.6.0/installation">installation</a> and <a href="/docs/zh-CN/1.6.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.6.0/installation">installation</a> <a href="/docs/zh-CN/1.6.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-directory
├── docs
└── website
@ -70,16 +70,16 @@
└── 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.6.0/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.6.0/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> directory as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> directory.</p>
<p>您所有的文档文件都应该以 markdown <code>.md</code> 文件置于 <code>docs</code> 文件夹下。 任何博客文章都应在 <code>blog</code> 文件夹下。</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> directory as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.6.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 the webpage's title.</p>
<li><p><code>/docs</code> 文件夹下添加您的 <code>.md</code> 文档文件,确保每个文件中都包含 <a href="/docs/zh-CN/1.6.0/doc-markdown#documents">header</a> 的头信息。 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 the webpage's title.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
<span class="hljs-attr">id:</span> <span class="hljs-string">intro</span>
<span class="hljs-attr">title:</span> <span class="hljs-string">Getting</span> <span class="hljs-string">Started</span>
@ -129,7 +129,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.6.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.6.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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.6.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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.6.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.6.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.6.0/installation">installation</a> and <a href="/docs/zh-CN/1.6.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.6.0/installation">installation</a> <a href="/docs/zh-CN/1.6.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-directory
├── docs
└── website
@ -70,16 +70,16 @@
└── 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.6.0/installation">initialization</a> script.</p>
<p>假设你删除了由 <a href="/docs/zh-CN/1.6.0/installation">初始化</a> 脚本所创建的示例 <code>.md</code> 文件。</p>
</blockquote>
<p>All of your documentation files should be placed inside the <code>docs</code> directory as markdown <code>.md</code> files. Any blog posts should be inside the <code>blog</code> directory.</p>
<p>您所有的文档文件都应该以 markdown <code>.md</code> 文件置于 <code>docs</code> 文件夹下。 任何博客文章都应在 <code>blog</code> 文件夹下。</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> directory as <code>.md</code> files, ensuring you have the proper <a href="/docs/zh-CN/1.6.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 the webpage's title.</p>
<li><p><code>/docs</code> 文件夹下添加您的 <code>.md</code> 文档文件,确保每个文件中都包含 <a href="/docs/zh-CN/1.6.0/doc-markdown#documents">header</a> 的头信息。 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 the webpage's title.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-meta">---</span>
<span class="hljs-attr">id:</span> <span class="hljs-string">intro</span>
<span class="hljs-attr">title:</span> <span class="hljs-string">Getting</span> <span class="hljs-string">Started</span>
@ -129,7 +129,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.6.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.6.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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.6.0/site-preparation"><span class="arrow-prev"></span><span>Site Preparation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.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

@ -79,25 +79,25 @@
└── static
</code></pre>
<blockquote>
<p>You may have already renamed the example blog (<code>website/blog-examples-from-docusaurus</code> to <code>website/blog</code>) and document (<code>docs-examples-from-docusaurus</code> to <code>docs</code>) directories when you <a href="/docs/zh-CN/1.6.0/installation##verifying-installation">verified the installation</a>.</p>
<p><a href="/docs/zh-CN/1.6.0/installation##verifying-installation">verified the installation</a> 步骤后,你可能已经重命名了博客(<code>website/blog-examples-from-docusaurus</code> 重名为 <code>website/blog</code>)与文档文件夹(<code>docs-examples-from-docusaurus</code> 重名为 <code>docs</code>)。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="directory-descriptions"></a><a href="#directory-descriptions" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Directory Descriptions</h3>
<h3><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>目录介绍</h3>
<ul>
<li><strong>Documentation Source Files</strong>: The <code>docs-examples-from-docusaurus</code> directory contains example documentation files written in Markdown.</li>
<li><strong>Blog</strong>: The <code>website/blog-examples-from-docusaurus</code> directory contains examples of blog posts written in markdown.</li>
<li><strong>Pages</strong>: The <code>website/pages</code> directory contains example top-level pages for the site.</li>
<li><strong>Static files and images</strong>: The <code>website/static</code> directory contains static assets used by the example site.</li>
<li><strong>文档源文件</strong>:包含可编写的 Markdown 示例文件的文件夹 <code>docs-examples-from-docusaurus</code></li>
<li><strong>博客</strong>:包含了可编写的 Markdown 示例文章的文件夹 <code>website/blog-examples-from-docusaurus</code></li>
<li><strong>页面</strong>:包含示例网站顶级页面的文件夹 <code>website/pages</code></li>
<li><strong>静态资源与图片</strong>:包含供网站使用的静态资源文件夹 <code>website/static</code></li>
</ul>
<h3><a class="anchor" aria-hidden="true" id="key-files"></a><a href="#key-files" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Key Files</h3>
<h3><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>关键文件</h3>
<ul>
<li><strong>Footer</strong>: The <code>website/core/Footer.js</code> file is a React component that acts as the footer for the site generated by Docusaurus and should be customized by the user.</li>
<li><strong>Configuration file</strong>: The <code>website/siteConfig.js</code> file is the main configuration file used by Docusaurus.</li>
<li><strong>Sidebars</strong>: The <code>sidebars.json</code> file contains the structure and ordering of the documentation files.</li>
<li><strong>页脚</strong><code>website/core/Footer.js</code> 文件是一个 React 组件,用于生成 Docusaurus 站点的页脚,它可以由用户定制。</li>
<li><strong>配置文件</strong><code>website/siteConfig.js</code> 文件是 Docusaurus 的主配置文件。</li>
<li><strong>工具栏</strong><code>sidebars.json</code> 文件包含文档文件的结构与排序。</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="preparation-notes"></a><a href="#preparation-notes" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Preparation Notes</h2>
<h2><a class="anchor" aria-hidden="true" id="准备说明"></a><a href="#准备说明" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>准备说明</h2>
<p>您不能删除 <code>website/siteConfig.js</code><code>website/core/Footer.js</code> 文件, 但可以按您的意愿编辑它们。 The value of the <code>customDocsPath</code> key in <code>website/siteConfig.js</code> can be modified if you wish to use a different directory name or path. The <code>website</code> directory can also be renamed to anything you want it to be.</p>
<p>However, you should keep the <code>website/pages</code> and <code>website/static</code> directories. You may change the content inside them as you wish. 在 <code>website/pages</code> 目录,你至少应该有一个 <code>en/index.js</code><code>en/index.html</code> 以及在<code>website/static</code>里有一个图片作为您的页眉图标(header icon) 。</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.6.0/installation"><span class="arrow-prev"></span><span>Installation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/site-creation"><span>Creating your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#目录结构">目录结构</a><ul class="toc-headings"><li><a href="#directory-descriptions">Directory Descriptions</a></li><li><a href="#key-files">Key Files</a></li></ul></li><li><a href="#preparation-notes">Preparation Notes</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.6.0/installation"><span class="arrow-prev"></span><span>Installation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/site-creation"><span>Creating your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#目录结构">目录结构</a><ul class="toc-headings"><li><a href="#目录介绍">目录介绍</a></li><li><a href="#关键文件">关键文件</a></li></ul></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

@ -79,25 +79,25 @@
└── static
</code></pre>
<blockquote>
<p>You may have already renamed the example blog (<code>website/blog-examples-from-docusaurus</code> to <code>website/blog</code>) and document (<code>docs-examples-from-docusaurus</code> to <code>docs</code>) directories when you <a href="/docs/zh-CN/1.6.0/installation##verifying-installation">verified the installation</a>.</p>
<p><a href="/docs/zh-CN/1.6.0/installation##verifying-installation">verified the installation</a> 步骤后,你可能已经重命名了博客(<code>website/blog-examples-from-docusaurus</code> 重名为 <code>website/blog</code>)与文档文件夹(<code>docs-examples-from-docusaurus</code> 重名为 <code>docs</code>)。</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="directory-descriptions"></a><a href="#directory-descriptions" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Directory Descriptions</h3>
<h3><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>目录介绍</h3>
<ul>
<li><strong>Documentation Source Files</strong>: The <code>docs-examples-from-docusaurus</code> directory contains example documentation files written in Markdown.</li>
<li><strong>Blog</strong>: The <code>website/blog-examples-from-docusaurus</code> directory contains examples of blog posts written in markdown.</li>
<li><strong>Pages</strong>: The <code>website/pages</code> directory contains example top-level pages for the site.</li>
<li><strong>Static files and images</strong>: The <code>website/static</code> directory contains static assets used by the example site.</li>
<li><strong>文档源文件</strong>:包含可编写的 Markdown 示例文件的文件夹 <code>docs-examples-from-docusaurus</code></li>
<li><strong>博客</strong>:包含了可编写的 Markdown 示例文章的文件夹 <code>website/blog-examples-from-docusaurus</code></li>
<li><strong>页面</strong>:包含示例网站顶级页面的文件夹 <code>website/pages</code></li>
<li><strong>静态资源与图片</strong>:包含供网站使用的静态资源文件夹 <code>website/static</code></li>
</ul>
<h3><a class="anchor" aria-hidden="true" id="key-files"></a><a href="#key-files" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Key Files</h3>
<h3><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>关键文件</h3>
<ul>
<li><strong>Footer</strong>: The <code>website/core/Footer.js</code> file is a React component that acts as the footer for the site generated by Docusaurus and should be customized by the user.</li>
<li><strong>Configuration file</strong>: The <code>website/siteConfig.js</code> file is the main configuration file used by Docusaurus.</li>
<li><strong>Sidebars</strong>: The <code>sidebars.json</code> file contains the structure and ordering of the documentation files.</li>
<li><strong>页脚</strong><code>website/core/Footer.js</code> 文件是一个 React 组件,用于生成 Docusaurus 站点的页脚,它可以由用户定制。</li>
<li><strong>配置文件</strong><code>website/siteConfig.js</code> 文件是 Docusaurus 的主配置文件。</li>
<li><strong>工具栏</strong><code>sidebars.json</code> 文件包含文档文件的结构与排序。</li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="preparation-notes"></a><a href="#preparation-notes" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Preparation Notes</h2>
<h2><a class="anchor" aria-hidden="true" id="准备说明"></a><a href="#准备说明" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>准备说明</h2>
<p>您不能删除 <code>website/siteConfig.js</code><code>website/core/Footer.js</code> 文件, 但可以按您的意愿编辑它们。 The value of the <code>customDocsPath</code> key in <code>website/siteConfig.js</code> can be modified if you wish to use a different directory name or path. The <code>website</code> directory can also be renamed to anything you want it to be.</p>
<p>However, you should keep the <code>website/pages</code> and <code>website/static</code> directories. You may change the content inside them as you wish. 在 <code>website/pages</code> 目录,你至少应该有一个 <code>en/index.js</code><code>en/index.html</code> 以及在<code>website/static</code>里有一个图片作为您的页眉图标(header icon) 。</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/zh-CN/1.6.0/installation"><span class="arrow-prev"></span><span>Installation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/site-creation"><span>Creating your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#目录结构">目录结构</a><ul class="toc-headings"><li><a href="#directory-descriptions">Directory Descriptions</a></li><li><a href="#key-files">Key Files</a></li></ul></li><li><a href="#preparation-notes">Preparation Notes</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.6.0/installation"><span class="arrow-prev"></span><span>Installation</span></a><a class="docs-next button" href="/docs/zh-CN/1.6.0/site-creation"><span>Creating your site</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#目录结构">目录结构</a><ul class="toc-headings"><li><a href="#目录介绍">目录介绍</a></li><li><a href="#关键文件">关键文件</a></li></ul></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.6.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.6.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.6.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.6.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