mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 20:17:06 +02:00
parent
46e7d444e4
commit
bdabf15f58
756 changed files with 3330 additions and 2962 deletions
|
@ -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"><<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>/></span>
|
||||
<span class="hljs-tag"><<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>/></span>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-tag"><<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> /></span>
|
||||
<span class="hljs-tag"><<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> /></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>
|
||||
|
|
|
@ -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"><<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>/></span>
|
||||
<span class="hljs-tag"><<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>/></span>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-tag"><<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> /></span>
|
||||
<span class="hljs-tag"><<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> /></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>
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
<span class="hljs-attr">titlu:</span> <span class="hljs-string">Documentul</span> <span class="hljs-string">meu</span>
|
||||
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<p>Documentele cu versiuni au id-urile alterate pentru a include numărul versiunii când este copiat. Noul <code>id</code> este <code>versiune-${version}-${id}</code> unde <code>${version}</code> este numărul versiunii acelui document și <code>${id}</code> este <code>id</code>-ul original. Adițional, documentele cu versiuni au un câmp <code>original_id</code> adăugat cu id-ul original al documentului.</p>
|
||||
<p>De exemplu:</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/ro/next/site-config">siteConfig.js</a> docs for more information.</p>
|
||||
<p>De exemplu:</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="post-uri-pentru-blog"></a><a href="#post-uri-pentru-blog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Post-uri pentru Blog</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">URLautor:</span> <span class="hljs-string">http://twitter.com/franchementli</span>
|
||||
<span class="hljs-attr">autorFBID:</span> <span class="hljs-number">100002976521003</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="caracteristici-suplimentare"></a><a href="#caracteristici-suplimentare" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Caracteristici suplimentare</h2>
|
||||
<p>Docusaurus suportă niște caracteristici suplimentare când documentația este scrisă în 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-21-tab-22" class="nav-link active" data-group="group_21" data-tab="tab-group-21-content-22">JavaScript</div><div id="tab-group-21-tab-23" class="nav-link" data-group="group_21" data-tab="tab-group-21-content-23">Python</div><div id="tab-group-21-tab-24" class="nav-link" data-group="group_21" data-tab="tab-group-21-content-24">C</div><div id="tab-group-21-tab-25" class="nav-link" data-group="group_21" data-tab="tab-group-21-content-25">Pascal</div></div><div class="tab-content"><div id="tab-group-21-content-22" class="tab-pane active" data-group="group_21" 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-21-content-23" class="tab-pane" data-group="group_21" 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-21-content-24" class="tab-pane" data-group="group_21" 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"><stdio.h></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-21-content-24" class="tab-pane" data-group="group_21" 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"><stdio.h></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-21-content-25" class="tab-pane" data-group="group_21" 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>
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
<span class="hljs-attr">titlu:</span> <span class="hljs-string">Documentul</span> <span class="hljs-string">meu</span>
|
||||
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<p>Documentele cu versiuni au id-urile alterate pentru a include numărul versiunii când este copiat. Noul <code>id</code> este <code>versiune-${version}-${id}</code> unde <code>${version}</code> este numărul versiunii acelui document și <code>${id}</code> este <code>id</code>-ul original. Adițional, documentele cu versiuni au un câmp <code>original_id</code> adăugat cu id-ul original al documentului.</p>
|
||||
<p>De exemplu:</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/ro/next/site-config">siteConfig.js</a> docs for more information.</p>
|
||||
<p>De exemplu:</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="post-uri-pentru-blog"></a><a href="#post-uri-pentru-blog" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Post-uri pentru Blog</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">URLautor:</span> <span class="hljs-string">http://twitter.com/franchementli</span>
|
||||
<span class="hljs-attr">autorFBID:</span> <span class="hljs-number">100002976521003</span>
|
||||
<span class="hljs-meta">---</span>
|
||||
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="caracteristici-suplimentare"></a><a href="#caracteristici-suplimentare" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Caracteristici suplimentare</h2>
|
||||
<p>Docusaurus suportă niște caracteristici suplimentare când documentația este scrisă în 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-21-tab-22" class="nav-link active" data-group="group_21" data-tab="tab-group-21-content-22">JavaScript</div><div id="tab-group-21-tab-23" class="nav-link" data-group="group_21" data-tab="tab-group-21-content-23">Python</div><div id="tab-group-21-tab-24" class="nav-link" data-group="group_21" data-tab="tab-group-21-content-24">C</div><div id="tab-group-21-tab-25" class="nav-link" data-group="group_21" data-tab="tab-group-21-content-25">Pascal</div></div><div class="tab-content"><div id="tab-group-21-content-22" class="tab-pane active" data-group="group_21" 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-21-content-23" class="tab-pane" data-group="group_21" 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-21-content-24" class="tab-pane" data-group="group_21" 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"><stdio.h></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-21-content-24" class="tab-pane" data-group="group_21" 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"><stdio.h></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-21-content-25" class="tab-pane" data-group="group_21" 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>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<li><p>Run <code>docker-compose up</code> and Compose starts and runs your entire app.</p></li>
|
||||
</ol>
|
||||
<p>We include a basic <code>docker-compose.yml</code> in your project:</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>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<li><p>Run <code>docker-compose up</code> and Compose starts and runs your entire app.</p></li>
|
||||
</ol>
|
||||
<p>We include a basic <code>docker-compose.yml</code> in your project:</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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/ro/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/ro/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"><!DOCTYPE HTML></span>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-meta"><!DOCTYPE html></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en-US"</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>></span>
|
||||
<span class="hljs-tag"><<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>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /></span>
|
||||
<span class="hljs-tag"><<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>
|
||||
/></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>></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"></<span class="hljs-name">script</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">title</span>></span>Your Site Title Here<span class="hljs-tag"></<span class="hljs-name">title</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">body</span>></span>
|
||||
If you are not redirected automatically, follow this <span class="hljs-tag"><<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>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
If you are not redirected automatically, follow this
|
||||
<span class="hljs-tag"><<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>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
<span class="hljs-tag"></<span class="hljs-name">body</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">html</span>></span>
|
||||
</code></pre>
|
||||
|
|
|
@ -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/ro/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/ro/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"><!DOCTYPE HTML></span>
|
||||
<pre><code class="hljs css language-html"><span class="hljs-meta"><!DOCTYPE html></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en-US"</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span>></span>
|
||||
<span class="hljs-tag"><<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>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /></span>
|
||||
<span class="hljs-tag"><<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>
|
||||
/></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span>></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"></<span class="hljs-name">script</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">title</span>></span>Your Site Title Here<span class="hljs-tag"></<span class="hljs-name">title</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">head</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">body</span>></span>
|
||||
If you are not redirected automatically, follow this <span class="hljs-tag"><<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>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
If you are not redirected automatically, follow this
|
||||
<span class="hljs-tag"><<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>></span>link<span class="hljs-tag"></<span class="hljs-name">a</span>></span>.
|
||||
<span class="hljs-tag"></<span class="hljs-name">body</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">html</span>></span>
|
||||
</code></pre>
|
||||
|
|
|
@ -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">&anchor</span>
|
||||
<span class="hljs-attr">locale:</span>
|
||||
|
|
|
@ -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">&anchor</span>
|
||||
<span class="hljs-attr">locale:</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue