mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 10:37:20 +02:00
parent
6fe2a05585
commit
2a94db2d64
25 changed files with 93 additions and 90 deletions
|
@ -15,4 +15,4 @@ This line should never render in XML.</p>
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -13,4 +13,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -12,4 +12,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -16,4 +16,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
11
css/main.css
11
css/main.css
|
@ -733,11 +733,14 @@ a:hover code {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs {
|
pre code {
|
||||||
font-family: "SFMono-Regular",source-code-pro,Menlo,Monaco,Consolas,"Roboto Mono","Droid Sans Mono","Liberation Mono",Consolas,"Courier New",Courier,monospace;
|
display:block;
|
||||||
border-left: 4px solid #2E8555;
|
|
||||||
font-size: 13px;
|
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
padding:0.5em;
|
||||||
|
border-left: 4px solid #2E8555;
|
||||||
|
font-family: "SFMono-Regular",source-code-pro,Menlo,Monaco,Consolas,"Roboto Mono","Droid Sans Mono","Liberation Mono",Consolas,"Courier New",Courier,monospace;
|
||||||
|
font-size: 13px;
|
||||||
|
overflow-x:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** GitHub **/
|
/** GitHub **/
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<h3><a class="anchor" name="complibrarymarked"></a><code>CompLibrary.Marked</code> <a class="hash-link" href="#complibrarymarked">#</a></h3>
|
<h3><a class="anchor" name="complibrarymarked"></a><code>CompLibrary.Marked</code> <a class="hash-link" href="#complibrarymarked">#</a></h3>
|
||||||
<p>A React component that parses Markdown to html.</p>
|
<p>A React component that parses Markdown to html.</p>
|
||||||
<p>Example:</p>
|
<p>Example:</p>
|
||||||
<pre><code class="language-jsx"><span class="hljs-keyword">const</span> Marked = CompLibrary.Marked;
|
<pre><code class="hljs css jsx"><span class="hljs-keyword">const</span> Marked = CompLibrary.Marked;
|
||||||
|
|
||||||
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">Marked</span>></span>[Markdown syntax for a link](http://www.example.com)<span class="hljs-tag"></<span class="hljs-name">Marked</span>></span></span>
|
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">Marked</span>></span>[Markdown syntax for a link](http://www.example.com)<span class="hljs-tag"></<span class="hljs-name">Marked</span>></span></span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<p>Padding choices: <code>all</code>, <code>bottom</code>, <code>left</code>, <code>right</code>, <code>top</code>.<br>
|
<p>Padding choices: <code>all</code>, <code>bottom</code>, <code>left</code>, <code>right</code>, <code>top</code>.<br>
|
||||||
Background choices: <code>dark</code>, <code>highlight</code>, <code>light</code>.</p>
|
Background choices: <code>dark</code>, <code>highlight</code>, <code>light</code>.</p>
|
||||||
<p>Example:</p>
|
<p>Example:</p>
|
||||||
<pre><code class="language-jsx"><Container padding={["bottom", "top"]} background="light">
|
<pre><code class="hljs css jsx"><Container padding={["bottom", "top"]} background="light">
|
||||||
...
|
...
|
||||||
</Container>
|
</Container>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -42,7 +42,7 @@ Background choices: <code>dark</code>, <code>highlight</code>, <code>light</code
|
||||||
<li><code>imageLink</code> for a link destination from clicking the image</li>
|
<li><code>imageLink</code> for a link destination from clicking the image</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Example:</p>
|
<p>Example:</p>
|
||||||
<pre><code><GridBlock
|
<pre><code class="hljs"><GridBlock
|
||||||
align=<span class="hljs-string">"center"</span>
|
align=<span class="hljs-string">"center"</span>
|
||||||
contents={[
|
contents={[
|
||||||
{
|
{
|
||||||
|
@ -69,15 +69,15 @@ Background choices: <code>dark</code>, <code>highlight</code>, <code>light</code
|
||||||
<h2><a class="anchor" name="translating-strings"></a>Translating Strings <a class="hash-link" href="#translating-strings">#</a></h2>
|
<h2><a class="anchor" name="translating-strings"></a>Translating Strings <a class="hash-link" href="#translating-strings">#</a></h2>
|
||||||
<p>When translations are enabled, any pages inside <code>website/pages/en</code> will be translated for all enabled languages. Urls for non-English pages will use their language tags as specified in the <code>languages.js</code> file. E.g. The url for a French page of <code>website/pages/en/help.js</code> would be found at <code>${baseUrl}fr/help.html</code>.</p>
|
<p>When translations are enabled, any pages inside <code>website/pages/en</code> will be translated for all enabled languages. Urls for non-English pages will use their language tags as specified in the <code>languages.js</code> file. E.g. The url for a French page of <code>website/pages/en/help.js</code> would be found at <code>${baseUrl}fr/help.html</code>.</p>
|
||||||
<p>When writing pages that you wish to translate, wrap any strings to be translated inside a <code><translate></code> tag. e.g.,</p>
|
<p>When writing pages that you wish to translate, wrap any strings to be translated inside a <code><translate></code> tag. e.g.,</p>
|
||||||
<pre><code class="language-jsx"><p><span class="xml"><span class="hljs-tag"><<span class="hljs-name">translate</span>></span>I like translations<span class="hljs-tag"></<span class="hljs-name">translate</span>></span></span><span class="xml"><span class="hljs-tag"></<span class="hljs-name">p</span>></span></span>
|
<pre><code class="hljs css jsx"><p><span class="xml"><span class="hljs-tag"><<span class="hljs-name">translate</span>></span>I like translations<span class="hljs-tag"></<span class="hljs-name">translate</span>></span></span><span class="xml"><span class="hljs-tag"></<span class="hljs-name">p</span>></span></span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>You can also provide an optional description attribute to provide context for translators. e.g,</p>
|
<p>You can also provide an optional description attribute to provide context for translators. e.g,</p>
|
||||||
<pre><code class="language-jsx"><a href="/community">
|
<pre><code class="hljs css jsx"><a href="/community">
|
||||||
<translate desc="footer link to page referring to community github and slack">Community</translate>
|
<translate desc="footer link to page referring to community github and slack">Community</translate>
|
||||||
</a>
|
</a>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Add the following require statement as well:</p>
|
<p>Add the following require statement as well:</p>
|
||||||
<pre><code class="language-js"><span class="hljs-keyword">const</span> translate = <span class="hljs-built_in">require</span>(<span class="hljs-string">"../../server/translate.js"</span>).translate;
|
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> translate = <span class="hljs-built_in">require</span>(<span class="hljs-string">"../../server/translate.js"</span>).translate;
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Note that this path is valid for files inside <code>pages/en</code> and should be adjusted accordingly if files are in different locations, as discussed <a href="#page-require-paths">above</a>.</p>
|
<p>Note that this path is valid for files inside <code>pages/en</code> and should be adjusted accordingly if files are in different locations, as discussed <a href="#page-require-paths">above</a>.</p>
|
||||||
<h2><a class="anchor" name="using-static-assets"></a>Using Static Assets <a class="hash-link" href="#using-static-assets">#</a></h2>
|
<h2><a class="anchor" name="using-static-assets"></a>Using Static Assets <a class="hash-link" href="#using-static-assets">#</a></h2>
|
||||||
|
@ -96,4 +96,4 @@ Background choices: <code>dark</code>, <code>highlight</code>, <code>light</code
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -7,7 +7,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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-blog.md" target="_blank">Edit</a><h1>Adding a Blog</h1></header><article><div><span><h2><a class="anchor" name="initial-setup"></a>Initial Setup <a class="hash-link" href="#initial-setup">#</a></h2>
|
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-blog.md" target="_blank">Edit</a><h1>Adding a Blog</h1></header><article><div><span><h2><a class="anchor" name="initial-setup"></a>Initial Setup <a class="hash-link" href="#initial-setup">#</a></h2>
|
||||||
<p>To setup your site's blog, start by creating a <code>blog</code> folder within your repo's <code>website</code> directory.</p>
|
<p>To setup your site's blog, start by creating a <code>blog</code> folder within your repo's <code>website</code> directory.</p>
|
||||||
<p>Then, add a header link to your blog within <code>siteConfig.js</code>:</p>
|
<p>Then, add a header link to your blog within <code>siteConfig.js</code>:</p>
|
||||||
<pre><code><span class="hljs-string">headerLinks:</span> [
|
<pre><code class="hljs"><span class="hljs-string">headerLinks:</span> [
|
||||||
...
|
...
|
||||||
{<span class="hljs-string">blog:</span> <span class="hljs-literal">true</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Blog'</span>},
|
{<span class="hljs-string">blog:</span> <span class="hljs-literal">true</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Blog'</span>},
|
||||||
...
|
...
|
||||||
|
@ -61,4 +61,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -11,7 +11,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<h2><a class="anchor" name="running-from-the-command-line"></a>Running from the command line <a class="hash-link" href="#running-from-the-command-line">#</a></h2>
|
<h2><a class="anchor" name="running-from-the-command-line"></a>Running from the command line <a class="hash-link" href="#running-from-the-command-line">#</a></h2>
|
||||||
<p>The scripts can be run using either Yarn or npm. If you've already gone through our Getting Started guide, you may already be familiar with the <code>start</code> command. It's the command that tells Docusaurus to run the <code>docusaurus-start</code> script which generates the site and starts up a server, and it's usually invoked like so:</p>
|
<p>The scripts can be run using either Yarn or npm. If you've already gone through our Getting Started guide, you may already be familiar with the <code>start</code> command. It's the command that tells Docusaurus to run the <code>docusaurus-start</code> script which generates the site and starts up a server, and it's usually invoked like so:</p>
|
||||||
<pre><code>yarn <span class="hljs-keyword">run</span><span class="bash"> start
|
<pre><code class="hljs">yarn <span class="hljs-keyword">run</span><span class="bash"> start
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>The same script can be invoked using npm:</p>
|
<p>The same script can be invoked using npm:</p>
|
||||||
<pre><code>npm <span class="hljs-keyword">run</span><span class="bash"> start
|
<pre><code>npm <span class="hljs-keyword">run</span><span class="bash"> start
|
||||||
|
@ -84,4 +84,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -14,7 +14,7 @@
|
||||||
<p>Some suggestions for links you may want to provide: documentation, API, Twitter, Discord, Facebook groups, Stack Overflow, GitHub, etc.</p>
|
<p>Some suggestions for links you may want to provide: documentation, API, Twitter, Discord, Facebook groups, Stack Overflow, GitHub, etc.</p>
|
||||||
<p>Your footer will automatically get applied to all pages on your site, including docs and blog posts. The sole exception to this is any static html pages you include.</p>
|
<p>Your footer will automatically get applied to all pages on your site, including docs and blog posts. The sole exception to this is any static html pages you include.</p>
|
||||||
<p>If you don't want a footer for your site, change the <code>render</code> function of <code>core/Footer.js</code> to return <code>null</code>. e.g.,</p>
|
<p>If you don't want a footer for your site, change the <code>render</code> function of <code>core/Footer.js</code> to return <code>null</code>. e.g.,</p>
|
||||||
<pre><code class="language-jsx"><span class="hljs-keyword">const</span> React = <span class="hljs-built_in">require</span>(<span class="hljs-string">"react"</span>);
|
<pre><code class="hljs css jsx"><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">Footer</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
|
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Footer</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
|
||||||
render() {
|
render() {
|
||||||
|
@ -31,4 +31,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -11,20 +11,20 @@
|
||||||
<p><code>title</code>: The title of your document. If this field is not present, the document's <code>title</code> will default to it's <code>id</code>.</p>
|
<p><code>title</code>: The title of your document. If this field is not present, the document's <code>title</code> will default to it's <code>id</code>.</p>
|
||||||
<p><code>sidebar_label</code>: The text shown in the document sidebar for this document. If this field is not present, the document's <code>sidebar_label</code> will default to it's <code>title</code>.</p>
|
<p><code>sidebar_label</code>: The text shown in the document sidebar for this document. If this field is not present, the document's <code>sidebar_label</code> will default to it's <code>title</code>.</p>
|
||||||
<p>For example:</p>
|
<p>For example:</p>
|
||||||
<pre><code><span class="hljs-meta">---</span>
|
<pre><code class="hljs css markdown">---
|
||||||
<span class="hljs-attr">id:</span> <span class="hljs-string">doc1</span>
|
id: doc1
|
||||||
<span class="hljs-attr">title:</span> <span class="hljs-string">My</span> <span class="hljs-string">Document</span>
|
title: My Document
|
||||||
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
|
<span class="hljs-section">sidebar_label: Document
|
||||||
<span class="hljs-meta">---</span>
|
---</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Versioned documents have their ids altered to include the version number when they get copied. The new <code>id</code> is <code>version-${version}-${id}</code> where <code>${version}</code> is the version number of that document and <code>${id}</code> is the original <code>id</code>. Additionally, versioned documents get an added <code>original_id</code> field with the original document id.</p>
|
<p>Versioned documents have their ids altered to include the version number when they get copied. The new <code>id</code> is <code>version-${version}-${id}</code> where <code>${version}</code> is the version number of that document and <code>${id}</code> is the original <code>id</code>. Additionally, versioned documents get an added <code>original_id</code> field with the original document id.</p>
|
||||||
<p>For example:</p>
|
<p>For example:</p>
|
||||||
<pre><code><span class="hljs-meta">---</span>
|
<pre><code class="hljs css markdown">---
|
||||||
<span class="hljs-attr">id:</span> <span class="hljs-string">version-1.0.0-doc1</span>
|
id: version-1.0.0-doc1
|
||||||
<span class="hljs-attr">title:</span> <span class="hljs-string">My</span> <span class="hljs-string">Document</span>
|
title: My Document
|
||||||
<span class="hljs-attr">sidebar_label:</span> <span class="hljs-string">Document</span>
|
sidebar_label: Document
|
||||||
<span class="hljs-attr">original_id:</span> <span class="hljs-string">doc1</span>
|
<span class="hljs-section">original_id: doc1
|
||||||
<span class="hljs-meta">---</span>
|
---</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="blog-posts"></a>Blog Posts <a class="hash-link" href="#blog-posts">#</a></h2>
|
<h2><a class="anchor" name="blog-posts"></a>Blog Posts <a class="hash-link" href="#blog-posts">#</a></h2>
|
||||||
<p>Blog Posts use the following markdown header fields that are enclosed by a line <code>---</code> on either side:</p>
|
<p>Blog Posts use the following markdown header fields that are enclosed by a line <code>---</code> on either side:</p>
|
||||||
|
@ -33,32 +33,32 @@
|
||||||
<p><code>authorURL</code>: A page to link to when a site user clicks the author's name. If this field is omitted, the author's name will not link to anything.</p>
|
<p><code>authorURL</code>: A page to link to when a site user clicks the author's name. If this field is omitted, the author's name will not link to anything.</p>
|
||||||
<p><code>authorFBID</code>: The author's Facebook id, used only to get the author's profile picture to display with the blog post. If this field is omitted, no author picture will be shown for the blog post.</p>
|
<p><code>authorFBID</code>: The author's Facebook id, used only to get the author's profile picture to display with the blog post. If this field is omitted, no author picture will be shown for the blog post.</p>
|
||||||
<p>For example:</p>
|
<p>For example:</p>
|
||||||
<pre><code><span class="hljs-meta">---</span>
|
<pre><code class="hljs css markdown">---
|
||||||
<span class="hljs-attr">title:</span> <span class="hljs-string">My</span> <span class="hljs-string">First</span> <span class="hljs-string">Blog</span> <span class="hljs-string">Post</span>
|
title: My First Blog Post
|
||||||
<span class="hljs-attr">author:</span> <span class="hljs-string">Frank</span> <span class="hljs-string">Li</span>
|
author: Frank Li
|
||||||
<span class="hljs-attr">authorURL:</span> <span class="hljs-attr">http://twitter.com/franchementli</span>
|
authorURL: http://twitter.com/franchementli
|
||||||
<span class="hljs-attr">authorFBID:</span> <span class="hljs-number">100002976521003</span>
|
<span class="hljs-section">authorFBID: 100002976521003
|
||||||
<span class="hljs-meta">---</span>
|
---</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="extra-features"></a>Extra Features <a class="hash-link" href="#extra-features">#</a></h2>
|
<h2><a class="anchor" name="extra-features"></a>Extra Features <a class="hash-link" href="#extra-features">#</a></h2>
|
||||||
<p>Docusaurus supports some extra features when writing documentation in markdown.</p>
|
<p>Docusaurus supports some extra features when writing documentation in markdown.</p>
|
||||||
<h2><a class="anchor" name="linking-other-documents"></a>Linking other Documents <a class="hash-link" href="#linking-other-documents">#</a></h2>
|
<h2><a class="anchor" name="linking-other-documents"></a>Linking other Documents <a class="hash-link" href="#linking-other-documents">#</a></h2>
|
||||||
<p>You can use relative urls to other documentation files which will automatically get converted to the corresponding html links when they get rendered.</p>
|
<p>You can use relative urls to other documentation files which will automatically get converted to the corresponding html links when they get rendered.</p>
|
||||||
<p>Example:</p>
|
<p>Example:</p>
|
||||||
<pre><code class="language-markdown">[<span class="hljs-string">This links to another document</span>](<span class="hljs-link">other-document.md</span>)
|
<pre><code class="hljs css markdown">[<span class="hljs-string">This links to another document</span>](<span class="hljs-link">other-document.md</span>)
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>This markdown will automatically get converted into a link to <code>/docs/other-document.html</code> (or the appropriately translated/versioned link) once it gets rendered.</p>
|
<p>This markdown will automatically get converted into a link to <code>/docs/other-document.html</code> (or the appropriately translated/versioned link) once it gets rendered.</p>
|
||||||
<p>This can help when you want to navigate through docs on GitHub since the links there will be functional links to other documents (still on GitHub), but the documents will have the correct html links when they get rendered.</p>
|
<p>This can help when you want to navigate through docs on GitHub since the links there will be functional links to other documents (still on GitHub), but the documents will have the correct html links when they get rendered.</p>
|
||||||
<h2><a class="anchor" name="linking-to-images-and-other-assets"></a>Linking to Images and Other Assets <a class="hash-link" href="#linking-to-images-and-other-assets">#</a></h2>
|
<h2><a class="anchor" name="linking-to-images-and-other-assets"></a>Linking to Images and Other Assets <a class="hash-link" href="#linking-to-images-and-other-assets">#</a></h2>
|
||||||
<p>Static assets can be linked to in the same way that documents are, using relative urls. Static assets used in documents and blogs should go into <code>docs/assets</code> and <code>website/blog/assets</code>, respectively. The markdown will get converted into correct link paths so that these paths will work for documents of all languages and versions.</p>
|
<p>Static assets can be linked to in the same way that documents are, using relative urls. Static assets used in documents and blogs should go into <code>docs/assets</code> and <code>website/blog/assets</code>, respectively. The markdown will get converted into correct link paths so that these paths will work for documents of all languages and versions.</p>
|
||||||
<p>Example:</p>
|
<p>Example:</p>
|
||||||
<pre><code class="language-markdown">
|
<pre><code class="hljs css markdown">
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="generating-table-of-contents"></a>Generating Table of Contents <a class="hash-link" href="#generating-table-of-contents">#</a></h2>
|
<h2><a class="anchor" name="generating-table-of-contents"></a>Generating Table of Contents <a class="hash-link" href="#generating-table-of-contents">#</a></h2>
|
||||||
<p>You can make an autogenerated list of links, which can be useful as a table of contents for API docs.</p>
|
<p>You can make an autogenerated list of links, which can be useful as a table of contents for API docs.</p>
|
||||||
<p>In your markdown file, insert a line with the text <<code>AUTOGENERATED_TABLE_OF_CONTENTS</code>>. Write your documentation using <code>h3</code> headers for each function inside a code block. These will be found by Docusaurus and a list of links to these sections will inserted at the text <<code>AUTOGENERATED_TABLE_OF_CONTENTS</code>>.</p>
|
<p>In your markdown file, insert a line with the text <<code>AUTOGENERATED_TABLE_OF_CONTENTS</code>>. Write your documentation using <code>h3</code> headers for each function inside a code block. These will be found by Docusaurus and a list of links to these sections will inserted at the text <<code>AUTOGENERATED_TABLE_OF_CONTENTS</code>>.</p>
|
||||||
<p>Example:</p>
|
<p>Example:</p>
|
||||||
<pre><code class="language-markdown"><span class="hljs-section">### `docusaurus.function(a, b)`</span>
|
<pre><code class="hljs css markdown"><span class="hljs-section">### `docusaurus.function(a, b)`</span>
|
||||||
|
|
||||||
Text describing my function
|
Text describing my function
|
||||||
|
|
||||||
|
@ -68,13 +68,13 @@ Text describing my function
|
||||||
Text describing my function
|
Text describing my function
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>will lead to a table of contents of the functions:</p>
|
<p>will lead to a table of contents of the functions:</p>
|
||||||
<pre><code class="language-markdown"><span class="hljs-bullet">- </span><span class="hljs-code">`docusaurus.function(a, b)`</span>
|
<pre><code class="hljs css markdown"><span class="hljs-bullet">- </span><span class="hljs-code">`docusaurus.function(a, b)`</span>
|
||||||
<span class="hljs-bullet">- </span><span class="hljs-code">`docdoc(file)`</span>
|
<span class="hljs-bullet">- </span><span class="hljs-code">`docdoc(file)`</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>and each function will link to their corresponding sections in the page.</p>
|
<p>and each function will link to their corresponding sections in the page.</p>
|
||||||
<h2><a class="anchor" name="syntax-highlighting"></a>Syntax Highlighting <a class="hash-link" href="#syntax-highlighting">#</a></h2>
|
<h2><a class="anchor" name="syntax-highlighting"></a>Syntax Highlighting <a class="hash-link" href="#syntax-highlighting">#</a></h2>
|
||||||
<p>Syntax highlighting is enabled by default on fenced code blocks. The language should be detected automatically, but you can sometimes get better results by specifying the language. You can do so using an <a href="https://github.github.com/gfm/#example-111">info string</a>, following the three opening backticks. The following JavaScript example...</p>
|
<p>Syntax highlighting is enabled by default on fenced code blocks. The language should be detected automatically, but you can sometimes get better results by specifying the language. You can do so using an <a href="https://github.github.com/gfm/#example-111">info string</a>, following the three opening backticks. The following JavaScript example...</p>
|
||||||
<pre><code>```javascript
|
<pre><code class="hljs">```javascript
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<h1>Hello, world!</h1>,
|
<h1>Hello, world!</h1>,
|
||||||
document.getElementById('root')
|
document.getElementById('root')
|
||||||
|
@ -82,24 +82,24 @@ ReactDOM.render(
|
||||||
```
|
```
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>...would be rendered with syntax highlighting like so:</p>
|
<p>...would be rendered with syntax highlighting like so:</p>
|
||||||
<pre><code class="language-javascript">ReactDOM.render(
|
<pre><code class="hljs css javascript">ReactDOM.render(
|
||||||
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Hello, world!<span class="hljs-tag"></<span class="hljs-name">h1</span>></span></span>,
|
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Hello, world!<span class="hljs-tag"></<span class="hljs-name">h1</span>></span></span>,
|
||||||
<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'root'</span>)
|
<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'root'</span>)
|
||||||
);
|
);
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Highlighting is provided by <a href="https://highlightjs.org">Highlight.js</a> using the theme specified in your <code>siteConfig.js</code> file as part of the <code>highlight</code> key:</p>
|
<p>Highlighting is provided by <a href="https://highlightjs.org">Highlight.js</a> using the theme specified in your <code>siteConfig.js</code> file as part of the <code>highlight</code> key:</p>
|
||||||
<pre><code><span class="hljs-selector-tag">highlight</span>: {
|
<pre><code class="hljs css javascript">highlight: {
|
||||||
<span class="hljs-attribute">theme</span>: <span class="hljs-string">'default'</span>
|
<span class="hljs-attr">theme</span>: <span class="hljs-string">'default'</span>
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>You can find the full list of supported themes in the Highlight.js <a href="https://github.com/isagalaev/highlight.js/tree/master/src/styles"><code>styles</code></a> directory.</p>
|
<p>You can find the full list of supported themes in the Highlight.js <a href="https://github.com/isagalaev/highlight.js/tree/master/src/styles"><code>styles</code></a> directory.</p>
|
||||||
<h3><a class="anchor" name="registering-additional-languages"></a>Registering additional languages <a class="hash-link" href="#registering-additional-languages">#</a></h3>
|
<h3><a class="anchor" name="registering-additional-languages"></a>Registering additional languages <a class="hash-link" href="#registering-additional-languages">#</a></h3>
|
||||||
<p>While Highlight.js provides support for <a href="https://highlightjs.org/static/demo/">many popular languages out of the box</a>, you may find the need to register additional language support. For these cases, we provide an escape valve by exposing the <code>hljs</code> constant as part of the <code>highlight</code> config key. This in turn allows you to call <a href="http://highlightjs.readthedocs.io/en/latest/api.html#registerlanguage-name-language"><code>registerLanguage</code></a>:</p>
|
<p>While Highlight.js provides support for <a href="https://highlightjs.org/static/demo/">many popular languages out of the box</a>, you may find the need to register additional language support. For these cases, we provide an escape valve by exposing the <code>hljs</code> constant as part of the <code>highlight</code> config key. This in turn allows you to call <a href="http://highlightjs.readthedocs.io/en/latest/api.html#registerlanguage-name-language"><code>registerLanguage</code></a>:</p>
|
||||||
<pre><code><span class="hljs-selector-tag">highlight</span>: {
|
<pre><code class="hljs css javascript">highlight: {
|
||||||
<span class="hljs-attribute">theme</span>: <span class="hljs-string">'default'</span>,
|
<span class="hljs-attr">theme</span>: <span class="hljs-string">'default'</span>,
|
||||||
hljs: <span class="hljs-built_in">function</span>(hljs) {
|
<span class="hljs-attr">hljs</span>: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">hljs</span>) </span>{
|
||||||
hljs.<span class="hljs-built_in">registerLanguage</span>(<span class="hljs-string">'galacticbasic'</span>, function(hljs) {
|
hljs.registerLanguage(<span class="hljs-string">'galacticbasic'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">hljs</span>) </span>{
|
||||||
// ...
|
<span class="hljs-comment">// ...</span>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,4 +111,4 @@ ReactDOM.render(
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -9,7 +9,7 @@
|
||||||
<li><p>Create a <code>website</code> folder in the root of your GitHub repo.</p></li>
|
<li><p>Create a <code>website</code> folder in the root of your GitHub repo.</p></li>
|
||||||
<li><p><code>cd website</code></p></li>
|
<li><p><code>cd website</code></p></li>
|
||||||
<li><p>Create a <code>package.json</code> file with the following scripts that will be used when developing documentation with Docusaurus:</p>
|
<li><p>Create a <code>package.json</code> file with the following scripts that will be used when developing documentation with Docusaurus:</p>
|
||||||
<pre><code class="language-json">{
|
<pre><code class="hljs css json">{
|
||||||
<span class="hljs-attr">"scripts"</span>: {
|
<span class="hljs-attr">"scripts"</span>: {
|
||||||
<span class="hljs-attr">"start"</span>: <span class="hljs-string">"docusaurus-start"</span>,
|
<span class="hljs-attr">"start"</span>: <span class="hljs-string">"docusaurus-start"</span>,
|
||||||
<span class="hljs-attr">"build"</span>: <span class="hljs-string">"docusaurus-build"</span>,
|
<span class="hljs-attr">"build"</span>: <span class="hljs-string">"docusaurus-build"</span>,
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
}
|
}
|
||||||
</code></pre></li>
|
</code></pre></li>
|
||||||
<li><p>Install Docusaurus with <code>yarn</code> or <code>npm</code></p>
|
<li><p>Install Docusaurus with <code>yarn</code> or <code>npm</code></p>
|
||||||
<pre><code>yarn <span class="hljs-keyword">add</span><span class="bash"> docusaurus -dev
|
<pre><code class="hljs">yarn <span class="hljs-keyword">add</span><span class="bash"> docusaurus -dev
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>or</p>
|
<p>or</p>
|
||||||
<pre><code>npm install --<span class="hljs-built_in">save</span>-<span class="hljs-built_in">dev</span> docusaurus
|
<pre><code>npm install --<span class="hljs-built_in">save</span>-<span class="hljs-built_in">dev</span> docusaurus
|
||||||
|
@ -32,4 +32,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -7,7 +7,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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-navigation.md" target="_blank">Edit</a><h1>Navigation and Sidebars</h1></header><article><div><span><h2><a class="anchor" name="new-hidden-docs"></a>New Hidden Docs <a class="hash-link" href="#new-hidden-docs">#</a></h2>
|
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-navigation.md" target="_blank">Edit</a><h1>Navigation and Sidebars</h1></header><article><div><span><h2><a class="anchor" name="new-hidden-docs"></a>New Hidden Docs <a class="hash-link" href="#new-hidden-docs">#</a></h2>
|
||||||
<p>New markdown files within <code>docs</code> will show up as pages on the website. Creating a file such as "docs/getting-started.md" will enable the new page <code>/docs/getting-started.html</code>.</p>
|
<p>New markdown files within <code>docs</code> will show up as pages on the website. Creating a file such as "docs/getting-started.md" will enable the new page <code>/docs/getting-started.html</code>.</p>
|
||||||
<p>To change the id (link name) of the file, set the <code>id</code> field in the markdown header. At the top of <code>getting-started.md</code>:</p>
|
<p>To change the id (link name) of the file, set the <code>id</code> field in the markdown header. At the top of <code>getting-started.md</code>:</p>
|
||||||
<pre><code><span class="hljs-meta">---</span>
|
<pre><code class="hljs"><span class="hljs-meta">---</span>
|
||||||
<span class="hljs-attr">id:</span> <span class="hljs-string">intro</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>
|
<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-meta">---</span>
|
||||||
|
@ -91,4 +91,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -7,7 +7,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://github.com/facebookexperimental/docusaurus/edit/master/docs/getting-started-publishing.md" target="_blank">Edit</a><h1>Publishing your site</h1></header><article><div><span><p>You should now have a site up and running locally. Once you have customized it to your liking, it's time to publish it. Docusaurus generates a static HTML website that is ready to be served by your favorite web server or online hosting solution.</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://github.com/facebookexperimental/docusaurus/edit/master/docs/getting-started-publishing.md" target="_blank">Edit</a><h1>Publishing your site</h1></header><article><div><span><p>You should now have a site up and running locally. Once you have customized it to your liking, it's time to publish it. Docusaurus generates a static HTML website that is ready to be served by your favorite web server or online hosting solution.</p>
|
||||||
<h2><a class="anchor" name="building-static-html-pages"></a>Building Static HTML Pages <a class="hash-link" href="#building-static-html-pages">#</a></h2>
|
<h2><a class="anchor" name="building-static-html-pages"></a>Building Static HTML Pages <a class="hash-link" href="#building-static-html-pages">#</a></h2>
|
||||||
<p>To create a static build of your website, run the script:</p>
|
<p>To create a static build of your website, run the script:</p>
|
||||||
<pre><code>npm <span class="hljs-keyword">run</span><span class="bash"> build
|
<pre><code class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> build
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>or</p>
|
<p>or</p>
|
||||||
<pre><code>yarn <span class="hljs-keyword">run</span><span class="bash"> build
|
<pre><code>yarn <span class="hljs-keyword">run</span><span class="bash"> build
|
||||||
|
@ -70,4 +70,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -7,7 +7,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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-search.md" target="_blank">Edit</a><h1>Enabling Search</h1></header><article><div><span><p>Docusaurus supports search using <a href="https://community.algolia.com/docsearch/">Algolia DocSearch</a>. Once you have set up your site, <a href="https://community.algolia.com/docsearch/">enter your site information</a> to have Algolia crawl your website's documentation pages. Algolia will then send you an API key and index name for your site.</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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-search.md" target="_blank">Edit</a><h1>Enabling Search</h1></header><article><div><span><p>Docusaurus supports search using <a href="https://community.algolia.com/docsearch/">Algolia DocSearch</a>. Once you have set up your site, <a href="https://community.algolia.com/docsearch/">enter your site information</a> to have Algolia crawl your website's documentation pages. Algolia will then send you an API key and index name for your site.</p>
|
||||||
<h3><a class="anchor" name="enabling-the-search-bar"></a>Enabling the Search Bar <a class="hash-link" href="#enabling-the-search-bar">#</a></h3>
|
<h3><a class="anchor" name="enabling-the-search-bar"></a>Enabling the Search Bar <a class="hash-link" href="#enabling-the-search-bar">#</a></h3>
|
||||||
<p>Enter your search-only API key and index name into <code>siteConfig.js</code> in the <code>algolia</code> section to enable search for your site.</p>
|
<p>Enter your search-only API key and index name into <code>siteConfig.js</code> in the <code>algolia</code> section to enable search for your site.</p>
|
||||||
<pre><code class="language-js"><span class="hljs-keyword">const</span> siteConfig = {
|
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> siteConfig = {
|
||||||
...
|
...
|
||||||
algolia: {
|
algolia: {
|
||||||
<span class="hljs-attr">apiKey</span>: <span class="hljs-string">"my-search-only-api-key-1234"</span>,
|
<span class="hljs-attr">apiKey</span>: <span class="hljs-string">"my-search-only-api-key-1234"</span>,
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3><a class="anchor" name="extra-search-options"></a>Extra Search Options <a class="hash-link" href="#extra-search-options">#</a></h3>
|
<h3><a class="anchor" name="extra-search-options"></a>Extra Search Options <a class="hash-link" href="#extra-search-options">#</a></h3>
|
||||||
<p>You can also specify extra <a href="https://community.algolia.com/docsearch/documentation/">search options used by Algolia</a> by using an <code>algoliaOptions</code> field in <code>algolia</code>. This may be useful if you want to provide different search results for the different versions or languages of your docs. Any occurrences of "VERSION" or "LANGUAGE" will be replaced by the version or language of the current page, respectively. More details about search options can be <a href="https://www.algolia.com/doc/api-reference/api-parameters/#overview">found here</a>.</p>
|
<p>You can also specify extra <a href="https://community.algolia.com/docsearch/documentation/">search options used by Algolia</a> by using an <code>algoliaOptions</code> field in <code>algolia</code>. This may be useful if you want to provide different search results for the different versions or languages of your docs. Any occurrences of "VERSION" or "LANGUAGE" will be replaced by the version or language of the current page, respectively. More details about search options can be <a href="https://www.algolia.com/doc/api-reference/api-parameters/#overview">found here</a>.</p>
|
||||||
<pre><code class="language-js"><span class="hljs-keyword">const</span> siteConfig = {
|
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> siteConfig = {
|
||||||
...
|
...
|
||||||
algolia: {
|
algolia: {
|
||||||
...
|
...
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<h3><a class="anchor" name="controlling-the-location-of-the-search-bar"></a>Controlling the Location of the Search Bar <a class="hash-link" href="#controlling-the-location-of-the-search-bar">#</a></h3>
|
<h3><a class="anchor" name="controlling-the-location-of-the-search-bar"></a>Controlling the Location of the Search Bar <a class="hash-link" href="#controlling-the-location-of-the-search-bar">#</a></h3>
|
||||||
<p>By default, the search bar will be the rightmost element in the top navigation bar.</p>
|
<p>By default, the search bar will be the rightmost element in the top navigation bar.</p>
|
||||||
<p>If you want to change the default location, add the <code>searchBar</code> flag in the <code>headerLinks</code> field of <code>siteConfig.js</code> in your desired location. For example, you may want the search bar in between your internal and external links.</p>
|
<p>If you want to change the default location, add the <code>searchBar</code> flag in the <code>headerLinks</code> field of <code>siteConfig.js</code> in your desired location. For example, you may want the search bar in between your internal and external links.</p>
|
||||||
<pre><code class="language-js"><span class="hljs-keyword">const</span> siteConfig = {
|
<pre><code class="hljs css js"><span class="hljs-keyword">const</span> siteConfig = {
|
||||||
...
|
...
|
||||||
headerLinks: [
|
headerLinks: [
|
||||||
{...}
|
{...}
|
||||||
|
@ -54,4 +54,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -19,7 +19,7 @@
|
||||||
<p><code>noIndex</code> - Boolean. If true, Docusaurus will politely ask crawlers and search engines to avoid indexing your site. This is done with a header tag and so only applies to docs and pages. Will not attempt to hide static resources. This is a best effort request. Malicious crawlers can and will still index your site.</p>
|
<p><code>noIndex</code> - Boolean. If true, Docusaurus will politely ask crawlers and search engines to avoid indexing your site. This is done with a header tag and so only applies to docs and pages. Will not attempt to hide static resources. This is a best effort request. Malicious crawlers can and will still index your site.</p>
|
||||||
<p><code>headerLinks</code> - Links that will be used in the header navigation bar. The <code>label</code> field of each object will be the link text and will also be translated for each language.</p>
|
<p><code>headerLinks</code> - Links that will be used in the header navigation bar. The <code>label</code> field of each object will be the link text and will also be translated for each language.</p>
|
||||||
<p>Example Usage:</p>
|
<p>Example Usage:</p>
|
||||||
<pre><code class="language-js">headerLinks: [
|
<pre><code class="hljs css js">headerLinks: [
|
||||||
<span class="hljs-comment">// Links to document with id doc1 for current language/version</span>
|
<span class="hljs-comment">// Links to document with id doc1 for current language/version</span>
|
||||||
{ <span class="hljs-attr">doc</span>: <span class="hljs-string">"doc1"</span>, <span class="hljs-attr">label</span>: <span class="hljs-string">"Getting Started"</span> },
|
{ <span class="hljs-attr">doc</span>: <span class="hljs-string">"doc1"</span>, <span class="hljs-attr">label</span>: <span class="hljs-string">"Getting Started"</span> },
|
||||||
<span class="hljs-comment">// Link to page found at pages/en/help.js or if that does not exist, pages/help.js, for current language</span>
|
<span class="hljs-comment">// Link to page found at pages/en/help.js or if that does not exist, pages/help.js, for current language</span>
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
<p><code>scripts</code> - Array of JavaScript sources to load. The script tag will be inserted in the HTML head.</p>
|
<p><code>scripts</code> - Array of JavaScript sources to load. The script tag will be inserted in the HTML head.</p>
|
||||||
<p>Users can also add their own custom fields if they wish to provide some data across different files.</p>
|
<p>Users can also add their own custom fields if they wish to provide some data across different files.</p>
|
||||||
<h2><a class="anchor" name="example-siteconfigjs-with-all-fields"></a>Example siteConfig.js with all fields <a class="hash-link" href="#example-siteconfigjs-with-all-fields">#</a></h2>
|
<h2><a class="anchor" name="example-siteconfigjs-with-all-fields"></a>Example siteConfig.js with all fields <a class="hash-link" href="#example-siteconfigjs-with-all-fields">#</a></h2>
|
||||||
<pre><code><span class="hljs-string">const</span> <span class="hljs-string">users</span> <span class="hljs-string">=</span> <span class="hljs-string">[</span>
|
<pre><code class="hljs"><span class="hljs-string">const</span> <span class="hljs-string">users</span> <span class="hljs-string">=</span> <span class="hljs-string">[</span>
|
||||||
<span class="hljs-string">{</span>
|
<span class="hljs-string">{</span>
|
||||||
<span class="hljs-attr"> caption:</span> <span class="hljs-string">"User1"</span><span class="hljs-string">,</span>
|
<span class="hljs-attr"> caption:</span> <span class="hljs-string">"User1"</span><span class="hljs-string">,</span>
|
||||||
<span class="hljs-attr"> image:</span> <span class="hljs-string">"/test-site/img/docusaurus.svg"</span><span class="hljs-string">,</span>
|
<span class="hljs-attr"> image:</span> <span class="hljs-string">"/test-site/img/docusaurus.svg"</span><span class="hljs-string">,</span>
|
||||||
|
@ -133,4 +133,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -10,7 +10,7 @@
|
||||||
<p><a href="/docs/en/site-preparation.html">Preparation</a> created a sample site for you to see Docusaurus in action. However, it also provided the infrastructure that will be used as you are developing your own site.</p>
|
<p><a href="/docs/en/site-preparation.html">Preparation</a> created a sample site for you to see Docusaurus in action. However, it also provided the infrastructure that will be used as you are developing your own site.</p>
|
||||||
<h2><a class="anchor" name="site-structure"></a>Site Structure <a class="hash-link" href="#site-structure">#</a></h2>
|
<h2><a class="anchor" name="site-structure"></a>Site Structure <a class="hash-link" href="#site-structure">#</a></h2>
|
||||||
<p>After loading the example site, you should see a structure in your repo that looks similar to:</p>
|
<p>After loading the example site, you should see a structure in your repo that looks similar to:</p>
|
||||||
<pre><code>project-repo/
|
<pre><code class="hljs">project-repo/
|
||||||
docs/
|
docs/
|
||||||
doc1<span class="hljs-selector-class">.md</span>
|
doc1<span class="hljs-selector-class">.md</span>
|
||||||
website/
|
website/
|
||||||
|
@ -47,4 +47,4 @@ yarn <span class="hljs-builtin-name">run</span> start # <span class="hljs-keywor
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -12,7 +12,7 @@
|
||||||
<h2><a class="anchor" name="verifying-installation"></a>Verifying Installation <a class="hash-link" href="#verifying-installation">#</a></h2>
|
<h2><a class="anchor" name="verifying-installation"></a>Verifying Installation <a class="hash-link" href="#verifying-installation">#</a></h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li><p>Generate the files for the example site by running <code>examples</code> using <code>yarn</code> or <code>npm</code>.</p>
|
<li><p>Generate the files for the example site by running <code>examples</code> using <code>yarn</code> or <code>npm</code>.</p>
|
||||||
<pre><code>npm <span class="hljs-keyword">run</span><span class="bash"> examples
|
<pre><code class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> examples
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>or</p>
|
<p>or</p>
|
||||||
<pre><code>yarn <span class="hljs-keyword">run</span><span class="bash"> examples
|
<pre><code>yarn <span class="hljs-keyword">run</span><span class="bash"> examples
|
||||||
|
@ -59,4 +59,4 @@ docs-examples-<span class="hljs-keyword">from</span>-docusaurus/...
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -7,7 +7,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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-translation.md" target="_blank">Edit</a><h1>Translations & Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using Crowdin. Documentation files written in English are uploaded to Crowdin for translation by users within a community. Top-level pages written with English strings can be translated by wrapping any strings you want to translate in a <code><translate></code> tag. Other titles and labels will also be found and properly translated.</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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-translation.md" target="_blank">Edit</a><h1>Translations & Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using Crowdin. Documentation files written in English are uploaded to Crowdin for translation by users within a community. Top-level pages written with English strings can be translated by wrapping any strings you want to translate in a <code><translate></code> tag. Other titles and labels will also be found and properly translated.</p>
|
||||||
<h2><a class="anchor" name="docusaurus-translation-configurations"></a>Docusaurus Translation Configurations <a class="hash-link" href="#docusaurus-translation-configurations">#</a></h2>
|
<h2><a class="anchor" name="docusaurus-translation-configurations"></a>Docusaurus Translation Configurations <a class="hash-link" href="#docusaurus-translation-configurations">#</a></h2>
|
||||||
<p>To generate example files for translations with Docusuaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
|
<p>To generate example files for translations with Docusuaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
|
||||||
<pre><code>npm <span class="hljs-keyword">run</span><span class="bash"> examples translations
|
<pre><code class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> examples translations
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>or</p>
|
<p>or</p>
|
||||||
<pre><code><span class="hljs-attribute">yarn examples translations</span>
|
<pre><code><span class="hljs-attribute">yarn examples translations</span>
|
||||||
|
@ -26,7 +26,7 @@ crowdin<span class="hljs-selector-class">.yaml</span>
|
||||||
<p>Pages allow you to customize layout and specific content of pages like a custom index page or help page.</p>
|
<p>Pages allow you to customize layout and specific content of pages like a custom index page or help page.</p>
|
||||||
<p>Pages with text that you want translated should be placed in <code>website/pages/en</code> folder.</p>
|
<p>Pages with text that you want translated should be placed in <code>website/pages/en</code> folder.</p>
|
||||||
<p>Wrap strings you want translated in a <code><translate></code> tag, and add the following <code>require</code> statement to the top of the file:</p>
|
<p>Wrap strings you want translated in a <code><translate></code> tag, and add the following <code>require</code> statement to the top of the file:</p>
|
||||||
<pre><code class="language-jsx">...
|
<pre><code class="hljs css jsx">...
|
||||||
const translate = require("../../server/translate.js").translate;
|
const translate = require("../../server/translate.js").translate;
|
||||||
...
|
...
|
||||||
<h2>
|
<h2>
|
||||||
|
@ -35,14 +35,14 @@ const translate = require("../../server/translate.js").translate;
|
||||||
...
|
...
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>You can also include an optional description attribute to give more context to a translator about how to translate the string:</p>
|
<p>You can also include an optional description attribute to give more context to a translator about how to translate the string:</p>
|
||||||
<pre><code class="language-jsx"><p>
|
<pre><code class="hljs css jsx"><p>
|
||||||
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">translate</span> <span class="hljs-attr">desc</span>=<span class="hljs-string">"flower, not verb"</span>></span>Rose<span class="hljs-tag"></<span class="hljs-name">translate</span>></span></span>
|
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">translate</span> <span class="hljs-attr">desc</span>=<span class="hljs-string">"flower, not verb"</span>></span>Rose<span class="hljs-tag"></<span class="hljs-name">translate</span>></span></span>
|
||||||
<p>
|
<p>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="gathering-strings-to-translate"></a>Gathering Strings to Translate <a class="hash-link" href="#gathering-strings-to-translate">#</a></h2>
|
<h2><a class="anchor" name="gathering-strings-to-translate"></a>Gathering Strings to Translate <a class="hash-link" href="#gathering-strings-to-translate">#</a></h2>
|
||||||
<p>The strings within localized Pages must be extracted and provided to Crowdin.</p>
|
<p>The strings within localized Pages must be extracted and provided to Crowdin.</p>
|
||||||
<p>Add the following script to your package.json file:</p>
|
<p>Add the following script to your package.json file:</p>
|
||||||
<pre><code class="language-json">...
|
<pre><code class="hljs css json">...
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"write-translations": "docusaurus-write-translations"
|
"write-translations": "docusaurus-write-translations"
|
||||||
},
|
},
|
||||||
|
@ -77,7 +77,7 @@ const translate = require("../../server/translate.js").translate;
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<p>The example below can be automatically generated by the docusaurus cli with the <code>examples</code> script. It should be placed in the top level of your project directory to configure how and what files are uploaded/downloaded.</p>
|
<p>The example below can be automatically generated by the docusaurus cli with the <code>examples</code> script. It should be placed in the top level of your project directory to configure how and what files are uploaded/downloaded.</p>
|
||||||
<p>Below is an example crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Behasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.</p>
|
<p>Below is an example crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Behasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.</p>
|
||||||
<pre><code class="language-yaml"><span class="hljs-attr">project_identifier_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_PROJECT_ID</span>
|
<pre><code class="hljs css 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">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">preserve_hierarchy:</span> <span class="hljs-literal">true</span>
|
||||||
|
@ -102,7 +102,7 @@ const translate = require("../../server/translate.js").translate;
|
||||||
<h3><a class="anchor" name="manual-file-sync"></a>Manual File Sync <a class="hash-link" href="#manual-file-sync">#</a></h3>
|
<h3><a class="anchor" name="manual-file-sync"></a>Manual File Sync <a class="hash-link" href="#manual-file-sync">#</a></h3>
|
||||||
<p>You will want to manually sync your files to and from crowdin. The sync process will upload any markdown files in <code>/docs</code> as well as translatable strings in <code>website/i18n/en.json</code>. (These strings can be generated by running <code>yarn write-translations</code>.)</p>
|
<p>You will want to manually sync your files to and from crowdin. The sync process will upload any markdown files in <code>/docs</code> as well as translatable strings in <code>website/i18n/en.json</code>. (These strings can be generated by running <code>yarn write-translations</code>.)</p>
|
||||||
<p>You can add the following to your <code>package.json</code> to manually trigger crowdin.</p>
|
<p>You can add the following to your <code>package.json</code> to manually trigger crowdin.</p>
|
||||||
<pre><code class="language-json">"scripts": {
|
<pre><code class="hljs css json">"scripts": {
|
||||||
"crowdin-upload": "export CROWDIN_DOCUSAURUS_PROJECT_ID=$YOUR_CROWDIN_ID;
|
"crowdin-upload": "export CROWDIN_DOCUSAURUS_PROJECT_ID=$YOUR_CROWDIN_ID;
|
||||||
export CROWDIN_DOCUSAURUS_API_KEY=$YOUR_CROWDIN_API_KEY; crowdin-cli --config ../crowdin.yaml upload sources --auto-update -b master",
|
export CROWDIN_DOCUSAURUS_API_KEY=$YOUR_CROWDIN_API_KEY; crowdin-cli --config ../crowdin.yaml upload sources --auto-update -b master",
|
||||||
"crowdin-download": "export CROWDIN_DOCUSAURUS_PROJECT_ID=$YOUR_CROWDIN_ID;
|
"crowdin-download": "export CROWDIN_DOCUSAURUS_PROJECT_ID=$YOUR_CROWDIN_ID;
|
||||||
|
@ -114,7 +114,7 @@ const translate = require("../../server/translate.js").translate;
|
||||||
<h3><a class="anchor" name="automated-file-sync-using-circleci"></a>Automated File Sync Using CircleCI <a class="hash-link" href="#automated-file-sync-using-circleci">#</a></h3>
|
<h3><a class="anchor" name="automated-file-sync-using-circleci"></a>Automated File Sync Using CircleCI <a class="hash-link" href="#automated-file-sync-using-circleci">#</a></h3>
|
||||||
<p>You can automate pulling down and uploading translations for your files using the <a href="https://circleci.com">CircleCI</a> web continuous integration service.</p>
|
<p>You can automate pulling down and uploading translations for your files using the <a href="https://circleci.com">CircleCI</a> web continuous integration service.</p>
|
||||||
<p>First, update the <code>circle.yml</code> file in your project directory to include steps to upload English files to be translated and download translated files using the Crowdin CLI. Here is an example <code>circle.yml</code> file:</p>
|
<p>First, update the <code>circle.yml</code> file in your project directory to include steps to upload English files to be translated and download translated files using the Crowdin CLI. Here is an example <code>circle.yml</code> file:</p>
|
||||||
<pre><code class="language-yaml"><span class="hljs-attr">machine:</span>
|
<pre><code class="hljs css yaml"><span class="hljs-attr">machine:</span>
|
||||||
<span class="hljs-attr"> node:</span>
|
<span class="hljs-attr"> node:</span>
|
||||||
<span class="hljs-attr"> version:</span> <span class="hljs-number">6.10</span><span class="hljs-number">.3</span>
|
<span class="hljs-attr"> version:</span> <span class="hljs-number">6.10</span><span class="hljs-number">.3</span>
|
||||||
<span class="hljs-attr"> npm:</span>
|
<span class="hljs-attr"> npm:</span>
|
||||||
|
@ -152,7 +152,7 @@ const translate = require("../../server/translate.js").translate;
|
||||||
<p>TODO - This section needs to be fleshed out.</p>
|
<p>TODO - This section needs to be fleshed out.</p>
|
||||||
<p>OLD -</p>
|
<p>OLD -</p>
|
||||||
<p>If you wish to have translation and versioning for your documentation, add the following section to the end of your <code>crowdin.yaml</code> file:</p>
|
<p>If you wish to have translation and versioning for your documentation, add the following section to the end of your <code>crowdin.yaml</code> file:</p>
|
||||||
<pre><code class="language-yaml"><span class="hljs-bullet"> -</span>
|
<pre><code class="hljs css yaml"><span class="hljs-bullet"> -</span>
|
||||||
<span class="hljs-attr"> source:</span> <span class="hljs-string">'/website/versioned_docs/**/*.md'</span>
|
<span class="hljs-attr"> source:</span> <span class="hljs-string">'/website/versioned_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"> 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"> languages_mapping:</span> <span class="hljs-meta">*anchor</span>
|
||||||
|
@ -165,4 +165,4 @@ const translate = require("../../server/translate.js").translate;
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -7,14 +7,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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-versioning.md" target="_blank">Edit</a><h1>Versioning</h1></header><article><div><span><p>Users can use the <code>version</code> script to cut a new documentation version based on the latest content in the <code>docs</code> folder. That specific set of documentation will then be preserved and accessible even as the documentation in the <code>docs</code> folder changes moving forward.</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://github.com/facebookexperimental/docusaurus/edit/master/docs/guides-versioning.md" target="_blank">Edit</a><h1>Versioning</h1></header><article><div><span><p>Users can use the <code>version</code> script to cut a new documentation version based on the latest content in the <code>docs</code> folder. That specific set of documentation will then be preserved and accessible even as the documentation in the <code>docs</code> folder changes moving forward.</p>
|
||||||
<h2><a class="anchor" name="how-to-create-new-versions"></a>How to Create New Versions <a class="hash-link" href="#how-to-create-new-versions">#</a></h2>
|
<h2><a class="anchor" name="how-to-create-new-versions"></a>How to Create New Versions <a class="hash-link" href="#how-to-create-new-versions">#</a></h2>
|
||||||
<p>Add the following script to your <code>package.json</code> file:</p>
|
<p>Add the following script to your <code>package.json</code> file:</p>
|
||||||
<pre><code class="language-json">...
|
<pre><code class="hljs css json">...
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"version": "docusaurus-version"
|
"version": "docusaurus-version"
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Run the script with a command line argument of the version you wish to create. e.g.,</p>
|
<p>Run the script with a command line argument of the version you wish to create. e.g.,</p>
|
||||||
<pre><code class="language-bash">npm run version 1.0.0
|
<pre><code class="hljs css bash">npm run version 1.0.0
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>This will preserve all documents currently in the <code>docs</code> folder and make them available as documentation for version <code>1.0.0</code>.</p>
|
<p>This will preserve all documents currently in the <code>docs</code> folder and make them available as documentation for version <code>1.0.0</code>.</p>
|
||||||
<p>If, for example, you ran the version script with 1.0.0 as the version number, version 1.0.0 is considered the latest release version for your project, and the site will display the version number next to the title in the header.</p>
|
<p>If, for example, you ran the version script with 1.0.0 as the version number, version 1.0.0 is considered the latest release version for your project, and the site will display the version number next to the title in the header.</p>
|
||||||
|
@ -33,14 +33,14 @@
|
||||||
<p>For example, a document with the original id <code>doc1</code> exists for the latest version, <code>1.0.0</code>, and has the same content as the document with the id <code>doc1</code> in the <code>docs</code> folder. When a new version <code>2.0.0</code> is created, the file for <code>doc1</code> will not be copied into <code>versioned_docs/version-2.0.0/</code>. There will still be a page for <code>docs/2.0.0/doc1.html</code>, but it will use the file from version <code>1.0.0</code>.</p>
|
<p>For example, a document with the original id <code>doc1</code> exists for the latest version, <code>1.0.0</code>, and has the same content as the document with the id <code>doc1</code> in the <code>docs</code> folder. When a new version <code>2.0.0</code> is created, the file for <code>doc1</code> will not be copied into <code>versioned_docs/version-2.0.0/</code>. There will still be a page for <code>docs/2.0.0/doc1.html</code>, but it will use the file from version <code>1.0.0</code>.</p>
|
||||||
<h2><a class="anchor" name="renaming-existing-versions"></a>Renaming Existing Versions <a class="hash-link" href="#renaming-existing-versions">#</a></h2>
|
<h2><a class="anchor" name="renaming-existing-versions"></a>Renaming Existing Versions <a class="hash-link" href="#renaming-existing-versions">#</a></h2>
|
||||||
<p>To rename an existing version number to something else, first make sure the following script is in your <code>package.json</code> file:</p>
|
<p>To rename an existing version number to something else, first make sure the following script is in your <code>package.json</code> file:</p>
|
||||||
<pre><code class="language-json">...
|
<pre><code class="hljs css json">...
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"rename-version": "docusaurus-rename-version"
|
"rename-version": "docusaurus-rename-version"
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Run the script with command line arguments of first, the current version name, then second, the new version name. e.g.,</p>
|
<p>Run the script with command line arguments of first, the current version name, then second, the new version name. e.g.,</p>
|
||||||
<pre><code class="language-bash">npm run rename-version 1.0.0 1.0.1
|
<pre><code class="hljs css bash">npm run rename-version 1.0.0 1.0.1
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="versioning-and-translations"></a>Versioning and Translations <a class="hash-link" href="#versioning-and-translations">#</a></h2>
|
<h2><a class="anchor" name="versioning-and-translations"></a>Versioning and Translations <a class="hash-link" href="#versioning-and-translations">#</a></h2>
|
||||||
<p>If you wish to use versioning and translations features, the <code>crowdin.yaml</code> file should be set up to upload and download versioned documents to and from Crowdin for translation. Translated, versioned files will go into the folder <code>translated_docs/${language}/version-${version}/</code>. For more information, check out the <a href="translation.md">translations guide</a>.</p>
|
<p>If you wish to use versioning and translations features, the <code>crowdin.yaml</code> file should be set up to upload and download versioned documents to and from Crowdin for translation. Translated, versioned files will go into the folder <code>translated_docs/${language}/version-${version}/</code>. For more information, check out the <a href="translation.md">translations guide</a>.</p>
|
||||||
|
@ -51,4 +51,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -11,4 +11,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -23,4 +23,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -5,4 +5,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -11,4 +11,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -23,4 +23,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
|
@ -5,4 +5,4 @@
|
||||||
indexName: 'docusaurus',
|
indexName: 'docusaurus',
|
||||||
inputSelector: '#search_input_react'
|
inputSelector: '#search_input_react'
|
||||||
});
|
});
|
||||||
</script><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script></body></html>
|
</script></body></html>
|
Loading…
Add table
Add a link
Reference in a new issue