Deploy website

Deploy website version based on 55e676cb25
This commit is contained in:
Website Deployment Script 2019-12-08 06:22:21 +00:00
parent 46e7d444e4
commit bdabf15f58
756 changed files with 3330 additions and 2962 deletions

View file

@ -128,8 +128,8 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<span class="hljs-built_in">module</span>.exports = MyPage;
</code></pre>
<p>This will be translated to a description metadata tag on the generated HTML.</p>
<pre><code class="hljs css language-html"><span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/&gt;</span>
<pre><code class="hljs css language-html"><span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /&gt;</span>
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="page-require-paths"></a><a href="#page-require-paths" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Page Require Paths</h2>
<p>Docusaurus provides a few useful React components for users to write their own pages, found in the <code>CompLibrary</code> module. This module is provided as part of Docusaurus in <code>node_modules/docusaurus</code>, so to access it, pages in the <code>pages</code> directory are temporarily copied into <code>node_modules/docusaurus</code> when rendering to static HTML. As seen in the example files, this means that a user page at <code>pages/en/index.js</code> uses a require path to <code>'../../core/CompLibrary.js'</code> to import the provided components.</p>

View file

@ -128,8 +128,8 @@ MyPage.description = <span class="hljs-string">'My Custom Description'</span>;
<span class="hljs-built_in">module</span>.exports = MyPage;
</code></pre>
<p>This will be translated to a description metadata tag on the generated HTML.</p>
<pre><code class="hljs css language-html"><span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span>/&gt;</span>
<pre><code class="hljs css language-html"><span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"og:description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"description"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"My Custom Description"</span> /&gt;</span>
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="page-require-paths"></a><a href="#page-require-paths" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Page Require Paths</h2>
<p>Docusaurus provides a few useful React components for users to write their own pages, found in the <code>CompLibrary</code> module. This module is provided as part of Docusaurus in <code>node_modules/docusaurus</code>, so to access it, pages in the <code>pages</code> directory are temporarily copied into <code>node_modules/docusaurus</code> when rendering to static HTML. As seen in the example files, this means that a user page at <code>pages/en/index.js</code> uses a require path to <code>'../../core/CompLibrary.js'</code> to import the provided components.</p>

View file

@ -97,6 +97,7 @@
<span class="hljs-attr">title:</span> <span class="hljs-string">My</span> <span class="hljs-string">Document</span>
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
<span class="hljs-meta">---</span>
</code></pre>
<p>经过版本控制的文档在被复制时会更改其 id 这样才能包含版本号。 新的 <code>id</code><code>version-${version}-${id}</code>, 其中 <code>${version}</code> 是该文档的版本号, <code>$ {id}</code> 是原始的 <code>id</code>。 此外,版本文档可得到<code>original_id</code> 文件使用原版的文件id。</p>
<p>例如:</p>
@ -106,6 +107,7 @@
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
<span class="hljs-attr">original_id:</span> <span class="hljs-string">doc1</span>
<span class="hljs-meta">---</span>
</code></pre>
<p><code>custom_edit_url</code>: The URL for editing this document. If this field is not present, the document's edit URL will fall back to <code>editUrl</code> from optional fields of <code>siteConfig.js</code>. See <a href="/docs/zh-CN/next/site-config">siteConfig.js</a> docs for more information.</p>
<p>例如:</p>
@ -114,6 +116,7 @@
<span class="hljs-attr">title:</span> <span class="hljs-string">Markdown</span> <span class="hljs-string">Features</span>
<span class="hljs-attr">custom_edit_url:</span> <span class="hljs-string">https://github.com/facebook/docusaurus/edit/master/docs/api-doc-markdown.md</span>
<span class="hljs-meta">---</span>
</code></pre>
<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>
<p>Blog posts use the following markdown header fields that are enclosed by a line <code>---</code> on either side:</p>
@ -128,6 +131,7 @@
<span class="hljs-attr">authorURL:</span> <span class="hljs-string">http://twitter.com/franchementli</span>
<span class="hljs-attr">authorFBID:</span> <span class="hljs-number">100002976521003</span>
<span class="hljs-meta">---</span>
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="更多功能"></a><a href="#更多功能" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>更多功能</h2>
<p>Docusaurus 在markdown中编写文档时支持一些额外的功能。</p>
@ -167,7 +171,7 @@ Text describing my function
<p>produces this:</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-31-tab-32" class="nav-link active" data-group="group_31" data-tab="tab-group-31-content-32">JavaScript</div><div id="tab-group-31-tab-33" class="nav-link" data-group="group_31" data-tab="tab-group-31-content-33">Python</div><div id="tab-group-31-tab-34" class="nav-link" data-group="group_31" data-tab="tab-group-31-content-34">C</div><div id="tab-group-31-tab-35" class="nav-link" data-group="group_31" data-tab="tab-group-31-content-35">Pascal</div></div><div class="tab-content"><div id="tab-group-31-content-32" class="tab-pane active" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-js"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Hello, world!'</span>);<br /></code></pre>
</span></div></div><div id="tab-group-31-content-33" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-py">print(<span class="hljs-string">'Hello, world!'</span>)<br /></code></pre>
</span></div></div><div id="tab-group-31-content-34" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-C"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span><br /><br /><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span> </span>{<br /> <span class="hljs-built_in">printf</span>(<span class="hljs-string">"Hello World!"</span>);<br /> <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;<br />}<br /></code></pre>
</span></div></div><div id="tab-group-31-content-34" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-C"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span><br /><br /><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span> </span>{<br /> <span class="hljs-built_in">printf</span>(<span class="hljs-string">"Hello World!"</span>);<br /> <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;<br />}<br /></code></pre>
</span></div></div><div id="tab-group-31-content-35" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-Pascal"><span class="hljs-keyword">program</span> HelloWorld;<br /><span class="hljs-keyword">begin</span><br /> WriteLn(<span class="hljs-string">'Hello, world!'</span>);<br /><span class="hljs-keyword">end</span>.<br /></code></pre>
</span></div></div></div></div>
<h2><a class="anchor" aria-hidden="true" id="syntax-highlighting"></a><a href="#syntax-highlighting" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Syntax Highlighting</h2>

View file

@ -97,6 +97,7 @@
<span class="hljs-attr">title:</span> <span class="hljs-string">My</span> <span class="hljs-string">Document</span>
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
<span class="hljs-meta">---</span>
</code></pre>
<p>经过版本控制的文档在被复制时会更改其 id 这样才能包含版本号。 新的 <code>id</code><code>version-${version}-${id}</code>, 其中 <code>${version}</code> 是该文档的版本号, <code>$ {id}</code> 是原始的 <code>id</code>。 此外,版本文档可得到<code>original_id</code> 文件使用原版的文件id。</p>
<p>例如:</p>
@ -106,6 +107,7 @@
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
<span class="hljs-attr">original_id:</span> <span class="hljs-string">doc1</span>
<span class="hljs-meta">---</span>
</code></pre>
<p><code>custom_edit_url</code>: The URL for editing this document. If this field is not present, the document's edit URL will fall back to <code>editUrl</code> from optional fields of <code>siteConfig.js</code>. See <a href="/docs/zh-CN/next/site-config">siteConfig.js</a> docs for more information.</p>
<p>例如:</p>
@ -114,6 +116,7 @@
<span class="hljs-attr">title:</span> <span class="hljs-string">Markdown</span> <span class="hljs-string">Features</span>
<span class="hljs-attr">custom_edit_url:</span> <span class="hljs-string">https://github.com/facebook/docusaurus/edit/master/docs/api-doc-markdown.md</span>
<span class="hljs-meta">---</span>
</code></pre>
<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>
<p>Blog posts use the following markdown header fields that are enclosed by a line <code>---</code> on either side:</p>
@ -128,6 +131,7 @@
<span class="hljs-attr">authorURL:</span> <span class="hljs-string">http://twitter.com/franchementli</span>
<span class="hljs-attr">authorFBID:</span> <span class="hljs-number">100002976521003</span>
<span class="hljs-meta">---</span>
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="更多功能"></a><a href="#更多功能" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>更多功能</h2>
<p>Docusaurus 在markdown中编写文档时支持一些额外的功能。</p>
@ -167,7 +171,7 @@ Text describing my function
<p>produces this:</p>
<div class="tabs"><div class="nav-tabs"><div id="tab-group-31-tab-32" class="nav-link active" data-group="group_31" data-tab="tab-group-31-content-32">JavaScript</div><div id="tab-group-31-tab-33" class="nav-link" data-group="group_31" data-tab="tab-group-31-content-33">Python</div><div id="tab-group-31-tab-34" class="nav-link" data-group="group_31" data-tab="tab-group-31-content-34">C</div><div id="tab-group-31-tab-35" class="nav-link" data-group="group_31" data-tab="tab-group-31-content-35">Pascal</div></div><div class="tab-content"><div id="tab-group-31-content-32" class="tab-pane active" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-js"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Hello, world!'</span>);<br /></code></pre>
</span></div></div><div id="tab-group-31-content-33" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-py">print(<span class="hljs-string">'Hello, world!'</span>)<br /></code></pre>
</span></div></div><div id="tab-group-31-content-34" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-C"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span><br /><br /><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span> </span>{<br /> <span class="hljs-built_in">printf</span>(<span class="hljs-string">"Hello World!"</span>);<br /> <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;<br />}<br /></code></pre>
</span></div></div><div id="tab-group-31-content-34" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-C"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span><br /><br /><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span> </span>{<br /> <span class="hljs-built_in">printf</span>(<span class="hljs-string">"Hello World!"</span>);<br /> <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;<br />}<br /></code></pre>
</span></div></div><div id="tab-group-31-content-35" class="tab-pane" data-group="group_31" tabindex="-1"><div><span><pre><code class="hljs css language-Pascal"><span class="hljs-keyword">program</span> HelloWorld;<br /><span class="hljs-keyword">begin</span><br /> WriteLn(<span class="hljs-string">'Hello, world!'</span>);<br /><span class="hljs-keyword">end</span>.<br /></code></pre>
</span></div></div></div></div>
<h2><a class="anchor" aria-hidden="true" id="syntax-highlighting"></a><a href="#syntax-highlighting" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Syntax Highlighting</h2>

View file

@ -105,7 +105,7 @@
<li><p>Run <code>docker-compose up</code> and Compose starts and runs your entire app.</p></li>
</ol>
<p>我们在您的项目中包含一个基本的 <code>docker-compose.yml</code></p>
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">"3"</span>
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">'3'</span>
<span class="hljs-attr">services:</span>
<span class="hljs-attr">docusaurus:</span>
@ -124,7 +124,6 @@
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/sidebars.json:/app/website/sidebars.json</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/siteConfig.js:/app/website/siteConfig.js</span>
<span class="hljs-attr">working_dir:</span> <span class="hljs-string">/app/website</span>
</code></pre>
<p>To run a local web server with <code>docker-compose</code> run <code>docker-compose up</code>.</p>
<p>To build static HTML pages for publishing run <code>docker-compose run docusaurus bash -c 'yarn publish-gh-pages'</code></p>

View file

@ -105,7 +105,7 @@
<li><p>Run <code>docker-compose up</code> and Compose starts and runs your entire app.</p></li>
</ol>
<p>我们在您的项目中包含一个基本的 <code>docker-compose.yml</code></p>
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">"3"</span>
<pre><code class="hljs css language-yml"><span class="hljs-attr">version:</span> <span class="hljs-string">'3'</span>
<span class="hljs-attr">services:</span>
<span class="hljs-attr">docusaurus:</span>
@ -124,7 +124,6 @@
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/sidebars.json:/app/website/sidebars.json</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./website/siteConfig.js:/app/website/siteConfig.js</span>
<span class="hljs-attr">working_dir:</span> <span class="hljs-string">/app/website</span>
</code></pre>
<p>To run a local web server with <code>docker-compose</code> run <code>docker-compose up</code>.</p>
<p>To build static HTML pages for publishing run <code>docker-compose run docusaurus bash -c 'yarn publish-gh-pages'</code></p>

View file

@ -89,7 +89,7 @@
<p>您必须有 Node &gt; = 8. x 与 Yarn &gt; = 1.5。</p>
</blockquote></li>
<li><p>Create a project, if none exists, and change your directory to this project's root.</p>
<p>文档会被创建在此目录下。 根目录可能会包含其他文件。 The Docusaurus installation script will create two new directories: <code>docs</code> and <code>website</code>.</p>
<p>文档会被创建在此目录下。 The root directory may contain other files. The Docusaurus installation script will create two new directories: <code>docs</code> and <code>website</code>.</p>
<blockquote>
<p>通常Docusaurus 站点的位置会是现有或新创建的 GitHub 项目。但这不是 Docusaurus 的强制要求。</p>
</blockquote></li>
@ -129,11 +129,11 @@
<p>This installation creates some Docker files that are not necessary to run docusaurus. They may be deleted without issue in the interest of saving space. For more information on Docker, please see the <a href="https://docs.docker.com/">Docker documentation</a>.</p>
</blockquote>
<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>根据 <a href="#installing-docusaurus">Installation</a> 部分所述运行完 Docusaurus 的初始化脚本 <code>docusaurus-init</code> 后,你将会有一个可运行的基础示例网站。 To run:</p>
<p>After running the Docusaurus initialization script, <code>docusaurus-init</code> as described in the <a href="#installing-docusaurus">Installation</a> section, you will have a runnable, example website to use as your site's base. To run:</p>
<ol>
<li><p><code>cd website</code></p></li>
<li><p>From within the <code>website</code> directory, run the local web server using <code>yarn start</code> or <code>npm start</code>.</p></li>
<li><p>如果没有自动打开本地的示例网站,请在 <a href="http://localhost:3000">http://localhost:3000</a> 访问示例站点。 If port 3000 has already been taken, another port will be used. Look at the console messages to see which.</p>
<li><p>Load the example site at <a href="http://localhost:3000">http://localhost:3000</a> if it did not already open automatically. If port 3000 has already been taken, another port will be used. Look at the console messages to see which.</p>
<p>You should see the example site loaded in your web browser. There's also a LiveReload server running and any changes made to the docs and files in the <code>website</code> directory will cause the page to refresh. A randomly generated primary and secondary theme color will be picked for you.</p></li>
</ol>
<p><img src="/img/getting-started-preparation-verify.png" alt=""></p>

View file

@ -89,7 +89,7 @@
<p>您必须有 Node &gt; = 8. x 与 Yarn &gt; = 1.5。</p>
</blockquote></li>
<li><p>Create a project, if none exists, and change your directory to this project's root.</p>
<p>文档会被创建在此目录下。 根目录可能会包含其他文件。 The Docusaurus installation script will create two new directories: <code>docs</code> and <code>website</code>.</p>
<p>文档会被创建在此目录下。 The root directory may contain other files. The Docusaurus installation script will create two new directories: <code>docs</code> and <code>website</code>.</p>
<blockquote>
<p>通常Docusaurus 站点的位置会是现有或新创建的 GitHub 项目。但这不是 Docusaurus 的强制要求。</p>
</blockquote></li>
@ -129,11 +129,11 @@
<p>This installation creates some Docker files that are not necessary to run docusaurus. They may be deleted without issue in the interest of saving space. For more information on Docker, please see the <a href="https://docs.docker.com/">Docker documentation</a>.</p>
</blockquote>
<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>根据 <a href="#installing-docusaurus">Installation</a> 部分所述运行完 Docusaurus 的初始化脚本 <code>docusaurus-init</code> 后,你将会有一个可运行的基础示例网站。 To run:</p>
<p>After running the Docusaurus initialization script, <code>docusaurus-init</code> as described in the <a href="#installing-docusaurus">Installation</a> section, you will have a runnable, example website to use as your site's base. To run:</p>
<ol>
<li><p><code>cd website</code></p></li>
<li><p>From within the <code>website</code> directory, run the local web server using <code>yarn start</code> or <code>npm start</code>.</p></li>
<li><p>如果没有自动打开本地的示例网站,请在 <a href="http://localhost:3000">http://localhost:3000</a> 访问示例站点。 If port 3000 has already been taken, another port will be used. Look at the console messages to see which.</p>
<li><p>Load the example site at <a href="http://localhost:3000">http://localhost:3000</a> if it did not already open automatically. If port 3000 has already been taken, another port will be used. Look at the console messages to see which.</p>
<p>You should see the example site loaded in your web browser. There's also a LiveReload server running and any changes made to the docs and files in the <code>website</code> directory will cause the page to refresh. A randomly generated primary and secondary theme color will be picked for you.</p></li>
</ol>
<p><img src="/img/getting-started-preparation-verify.png" alt=""></p>

View file

@ -315,7 +315,8 @@
<ol>
<li><p>Create a new <strong>Web Service</strong> on Render, and give Render's GitHub app permission to access your Docusaurus repo.</p></li>
<li><p>Select the branch to deploy. The default is <code>master</code>.</p></li>
<li><p>Enter the following values during creation.</p>
<li><p>Enter the following values during creation.</p></li>
</ol>
<table>
<thead>
<tr><th>Field</th><th>Value</th></tr>
@ -327,12 +328,12 @@
</tbody>
</table>
<p><code>projectName</code> is the value you defined in your <code>siteConfig.js</code>.</p>
<pre><code class="hljs css language-javascript{7}"><span class="hljs-keyword">const</span> siteConfig = {
<span class="hljs-comment">// ...</span>
projectName: <span class="hljs-string">'your-project-name'</span>,
<span class="hljs-comment">// ...</span>
</code></pre></li>
</ol>
<pre><code class="hljs">javascript{7}
const siteConfig = {
// ...
projectName: 'your-project-name',
// ...
</code></pre>
<p>That's it! Your app will be live on your Render URL as soon as the build finishes.</p>
<h3><a class="anchor" aria-hidden="true" id="publishing-to-github-enterprise"></a><a href="#publishing-to-github-enterprise" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Publishing to GitHub Enterprise</h3>
<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>

View file

@ -315,7 +315,8 @@
<ol>
<li><p>Create a new <strong>Web Service</strong> on Render, and give Render's GitHub app permission to access your Docusaurus repo.</p></li>
<li><p>Select the branch to deploy. The default is <code>master</code>.</p></li>
<li><p>Enter the following values during creation.</p>
<li><p>Enter the following values during creation.</p></li>
</ol>
<table>
<thead>
<tr><th>Field</th><th>Value</th></tr>
@ -327,12 +328,12 @@
</tbody>
</table>
<p><code>projectName</code> is the value you defined in your <code>siteConfig.js</code>.</p>
<pre><code class="hljs css language-javascript{7}"><span class="hljs-keyword">const</span> siteConfig = {
<span class="hljs-comment">// ...</span>
projectName: <span class="hljs-string">'your-project-name'</span>,
<span class="hljs-comment">// ...</span>
</code></pre></li>
</ol>
<pre><code class="hljs">javascript{7}
const siteConfig = {
// ...
projectName: 'your-project-name',
// ...
</code></pre>
<p>That's it! Your app will be live on your Render URL as soon as the build finishes.</p>
<h3><a class="anchor" aria-hidden="true" id="publishing-to-github-enterprise"></a><a href="#publishing-to-github-enterprise" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Publishing to GitHub Enterprise</h3>
<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>

View file

@ -111,7 +111,6 @@
<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>
<span class="hljs-meta">---</span>
<span class="hljs-string">My</span> <span class="hljs-string">new</span> <span class="hljs-string">content</span> <span class="hljs-string">here..</span>
</code></pre></li>
<li><p>Add zero or more docs to the <a href="/docs/zh-CN/next/navigation#adding-docs-to-a-sidebar"><code>sidebars.json</code></a> file so that your documentation is rendered in a sidebar if you choose them to be.</p></li>
@ -136,18 +135,22 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
<li>Remove the <code>index.js</code> file from the <code>website/pages</code> directory, if it exists.</li>
<li>Add a <a href="/docs/zh-CN/next/custom-pages#adding-static-pages">custom static <code>index.html</code> page</a> in the <code>website/static</code> directory with the following contents:</li>
</ol>
<pre><code class="hljs css language-html"><span class="hljs-meta">&lt;!DOCTYPE HTML&gt;</span>
<pre><code class="hljs css language-html"><span class="hljs-meta">&lt;!DOCTYPE html&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en-US"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span>
<span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span>
<span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>
/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>&gt;</span><span class="javascript">
<span class="hljs-built_in">window</span>.location.href = <span class="hljs-string">'docs/id-of-doc-to-land-on.html'</span>;
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Your Site Title Here<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
If you are not redirected automatically, follow this <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>&gt;</span>link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>.
If you are not redirected automatically, follow this
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>&gt;</span>link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>.
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>

View file

@ -111,7 +111,6 @@
<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>
<span class="hljs-meta">---</span>
<span class="hljs-string">My</span> <span class="hljs-string">new</span> <span class="hljs-string">content</span> <span class="hljs-string">here..</span>
</code></pre></li>
<li><p>Add zero or more docs to the <a href="/docs/zh-CN/next/navigation#adding-docs-to-a-sidebar"><code>sidebars.json</code></a> file so that your documentation is rendered in a sidebar if you choose them to be.</p></li>
@ -136,18 +135,22 @@ yarn run start <span class="hljs-comment"># or `npm run start`</span>
<li>Remove the <code>index.js</code> file from the <code>website/pages</code> directory, if it exists.</li>
<li>Add a <a href="/docs/zh-CN/next/custom-pages#adding-static-pages">custom static <code>index.html</code> page</a> in the <code>website/static</code> directory with the following contents:</li>
</ol>
<pre><code class="hljs css language-html"><span class="hljs-meta">&lt;!DOCTYPE HTML&gt;</span>
<pre><code class="hljs css language-html"><span class="hljs-meta">&lt;!DOCTYPE html&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en-US"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">meta</span>
<span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"refresh"</span>
<span class="hljs-attr">content</span>=<span class="hljs-string">"0; url=docs/id-of-doc-to-land-on.html"</span>
/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>&gt;</span><span class="javascript">
<span class="hljs-built_in">window</span>.location.href = <span class="hljs-string">'docs/id-of-doc-to-land-on.html'</span>;
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Your Site Title Here<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
If you are not redirected automatically, follow this <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>&gt;</span>link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>.
If you are not redirected automatically, follow this
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"docs/id-of-doc-to-land-on.html"</span>&gt;</span>link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>.
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>

View file

@ -160,7 +160,7 @@ languages.js
}
}
},
<span class="hljs-attr">"pages-strings"</span> : {
<span class="hljs-attr">"pages-strings"</span>: {
<span class="hljs-attr">"id3"</span>: <span class="hljs-string">"string3"</span>,
<span class="hljs-attr">"id4"</span>: <span class="hljs-string">"string4"</span>
}
@ -173,8 +173,8 @@ languages.js
<span class="hljs-attr">"localized-strings"</span>: {
<span class="hljs-attr">"translation"</span>: <span class="hljs-string">"Translations and Localization"</span>
},
<span class="hljs-attr">"pages-strings"</span> : {
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
<span class="hljs-attr">"pages-strings"</span>: {
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
}
}
</code></pre>
@ -204,12 +204,12 @@ languages.js
<p>Below is an example Crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Bahasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-attr">project_identifier_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_PROJECT_ID</span>
<span class="hljs-attr">api_key_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_API_KEY</span>
<span class="hljs-attr">base_path:</span> <span class="hljs-string">"./"</span>
<span class="hljs-attr">base_path:</span> <span class="hljs-string">'./'</span>
<span class="hljs-attr">preserve_hierarchy:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">files:</span>
<span class="hljs-bullet">-</span>
<span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
<span class="hljs-attr">translation:</span> <span class="hljs-string">'/website/translated_docs/%locale%/**/%original_file_name%'</span>
<span class="hljs-attr">languages_mapping:</span> <span class="hljs-meta">&amp;anchor</span>
<span class="hljs-attr">locale:</span>

View file

@ -160,7 +160,7 @@ languages.js
}
}
},
<span class="hljs-attr">"pages-strings"</span> : {
<span class="hljs-attr">"pages-strings"</span>: {
<span class="hljs-attr">"id3"</span>: <span class="hljs-string">"string3"</span>,
<span class="hljs-attr">"id4"</span>: <span class="hljs-string">"string4"</span>
}
@ -173,8 +173,8 @@ languages.js
<span class="hljs-attr">"localized-strings"</span>: {
<span class="hljs-attr">"translation"</span>: <span class="hljs-string">"Translations and Localization"</span>
},
<span class="hljs-attr">"pages-strings"</span> : {
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
<span class="hljs-attr">"pages-strings"</span>: {
<span class="hljs-attr">"Help Translate|recruit community translators for your project"</span>: <span class="hljs-string">"Help Us Translate"</span>
}
}
</code></pre>
@ -204,12 +204,12 @@ languages.js
<p>Below is an example Crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Bahasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.</p>
<pre><code class="hljs css language-yaml"><span class="hljs-attr">project_identifier_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_PROJECT_ID</span>
<span class="hljs-attr">api_key_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_API_KEY</span>
<span class="hljs-attr">base_path:</span> <span class="hljs-string">"./"</span>
<span class="hljs-attr">base_path:</span> <span class="hljs-string">'./'</span>
<span class="hljs-attr">preserve_hierarchy:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">files:</span>
<span class="hljs-bullet">-</span>
<span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
<span class="hljs-attr">translation:</span> <span class="hljs-string">'/website/translated_docs/%locale%/**/%original_file_name%'</span>
<span class="hljs-attr">languages_mapping:</span> <span class="hljs-meta">&amp;anchor</span>
<span class="hljs-attr">locale:</span>