mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
parent
226741598f
commit
09740316dd
8 changed files with 25 additions and 25 deletions
|
@ -16,7 +16,7 @@
|
||||||
<h2><a class="anchor" name="adding-posts"></a>Adding Posts <a class="hash-link" href="#adding-posts">#</a></h2>
|
<h2><a class="anchor" name="adding-posts"></a>Adding Posts <a class="hash-link" href="#adding-posts">#</a></h2>
|
||||||
<p>To publish in the blog, create a file within the blog folder with a formatted name of <code>YYYY-MM-DD-My-Blog-Post-Title.md</code>. The post date is extracted from the file name.</p>
|
<p>To publish in the blog, create a file within the blog folder with a formatted name of <code>YYYY-MM-DD-My-Blog-Post-Title.md</code>. The post date is extracted from the file name.</p>
|
||||||
<p>For example, at <code>website/blog/2017-08-18-Introducing-Docusaurus.md</code>:</p>
|
<p>For example, at <code>website/blog/2017-08-18-Introducing-Docusaurus.md</code>:</p>
|
||||||
<pre><code><span class="hljs-meta">---</span>
|
<pre><code class="hljs"><span class="hljs-meta">---</span>
|
||||||
<span class="hljs-attr">author:</span> <span class="hljs-string">Frank</span> <span class="hljs-string">Li</span>
|
<span class="hljs-attr">author:</span> <span class="hljs-string">Frank</span> <span class="hljs-string">Li</span>
|
||||||
<span class="hljs-attr">authorURL:</span> <span class="hljs-attr">https://twitter.com/foobarbaz</span>
|
<span class="hljs-attr">authorURL:</span> <span class="hljs-attr">https://twitter.com/foobarbaz</span>
|
||||||
<span class="hljs-attr">authorFBID:</span> <span class="hljs-number">503283835</span>
|
<span class="hljs-attr">authorFBID:</span> <span class="hljs-number">503283835</span>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<h2><a class="anchor" name="summary-truncation"></a>Summary Truncation <a class="hash-link" href="#summary-truncation">#</a></h2>
|
<h2><a class="anchor" name="summary-truncation"></a>Summary Truncation <a class="hash-link" href="#summary-truncation">#</a></h2>
|
||||||
<p>Use the <code><!--truncate--></code> marker in your blog post to represent what will be shown as the summary when viewing all blog published blog posts. Anything above <code><!--truncate--></code> will be part of the summary. For example:</p>
|
<p>Use the <code><!--truncate--></code> marker in your blog post to represent what will be shown as the summary when viewing all blog published blog posts. Anything above <code><!--truncate--></code> will be part of the summary. For example:</p>
|
||||||
<pre><code><span class="hljs-meta">---</span>
|
<pre><code class="hljs"><span class="hljs-meta">---</span>
|
||||||
<span class="hljs-attr">title:</span> <span class="hljs-string">Truncation</span> <span class="hljs-string">Exmaple</span>
|
<span class="hljs-attr">title:</span> <span class="hljs-string">Truncation</span> <span class="hljs-string">Exmaple</span>
|
||||||
<span class="hljs-meta">---</span>
|
<span class="hljs-meta">---</span>
|
||||||
|
|
||||||
|
|
|
@ -14,15 +14,15 @@
|
||||||
<pre><code class="hljs">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 class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> start
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>To run a particular script, just replace the <code>start</code> command in the examples above with the command associated with your script.</p>
|
<p>To run a particular script, just replace the <code>start</code> command in the examples above with the command associated with your script.</p>
|
||||||
<h2><a class="anchor" name="using-arguments"></a>Using arguments <a class="hash-link" href="#using-arguments">#</a></h2>
|
<h2><a class="anchor" name="using-arguments"></a>Using arguments <a class="hash-link" href="#using-arguments">#</a></h2>
|
||||||
<p>Some commands support optional arguments. For example, to start a server on port 8080, you can specify the <code>--port</code> argument when running <code>start</code>:</p>
|
<p>Some commands support optional arguments. For example, to start a server on port 8080, you can specify the <code>--port</code> argument when running <code>start</code>:</p>
|
||||||
<pre><code>yarn <span class="hljs-keyword">run</span><span class="bash"> start --port 8080
|
<pre><code class="hljs">yarn <span class="hljs-keyword">run</span><span class="bash"> start --port 8080
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>If you run Docusaurus using npm, you can still use the command line arguments by inserting a <code>--</code> between <code>npm run <command></code> and the command arguments:</p>
|
<p>If you run Docusaurus using npm, you can still use the command line arguments by inserting a <code>--</code> between <code>npm run <command></code> and the command arguments:</p>
|
||||||
<pre><code>npm <span class="hljs-keyword">run</span><span class="bash"> start -- --port 8080
|
<pre><code class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> start -- --port 8080
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<h2><a class="anchor" name="configuration"></a>Configuration <a class="hash-link" href="#configuration">#</a></h2>
|
<h2><a class="anchor" name="configuration"></a>Configuration <a class="hash-link" href="#configuration">#</a></h2>
|
||||||
<p>These scripts are set up under the <code>"scripts"</code> key in your <code>website/package.json</code> file as part of the installation process. If you need help setting them up again, please refer to the <a href="/docs/en/installation.html">Installation guide</a>.</p>
|
<p>These scripts are set up under the <code>"scripts"</code> key in your <code>website/package.json</code> file as part of the installation process. If you need help setting them up again, please refer to the <a href="/docs/en/installation.html">Installation guide</a>.</p>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<pre><code class="hljs">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 class="hljs">npm install --<span class="hljs-built_in">save</span>-<span class="hljs-built_in">dev</span> docusaurus
|
||||||
</code></pre></li>
|
</code></pre></li>
|
||||||
</ol>
|
</ol>
|
||||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-next button" href="site-preparation.html">Site Preparation →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="
|
</span></div></article></div><div class="docs-prevnext"><a class="docs-next button" href="site-preparation.html">Site Preparation →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
<h2><a class="anchor" name="adding-docs-to-a-sidebar"></a>Adding Docs to a Sidebar <a class="hash-link" href="#adding-docs-to-a-sidebar">#</a></h2>
|
<h2><a class="anchor" name="adding-docs-to-a-sidebar"></a>Adding Docs to a Sidebar <a class="hash-link" href="#adding-docs-to-a-sidebar">#</a></h2>
|
||||||
<p>Now we want our new page to show up on the sidebar. We configure the order of the sidebar in <code>website/sidebars.json</code>.</p>
|
<p>Now we want our new page to show up on the sidebar. We configure the order of the sidebar in <code>website/sidebars.json</code>.</p>
|
||||||
<p>Within <code>sidebars.json</code>, add the doc ID within an existing sidebar/category:</p>
|
<p>Within <code>sidebars.json</code>, add the doc ID within an existing sidebar/category:</p>
|
||||||
<pre><code>{
|
<pre><code class="hljs">{
|
||||||
<span class="hljs-string">"docs"</span>: {
|
<span class="hljs-string">"docs"</span>: {
|
||||||
<span class="hljs-string">"Getting Started"</span>: [
|
<span class="hljs-string">"Getting Started"</span>: [
|
||||||
<span class="hljs-string">"getting-started"</span>
|
<span class="hljs-string">"getting-started"</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Or you can create a new category within the sidebar:</p>
|
<p>Or you can create a new category within the sidebar:</p>
|
||||||
<pre><code>{
|
<pre><code class="hljs">{
|
||||||
<span class="hljs-string">"docs"</span>: {
|
<span class="hljs-string">"docs"</span>: {
|
||||||
...
|
...
|
||||||
<span class="hljs-string">"My New Sidebar Category"</span>: [
|
<span class="hljs-string">"My New Sidebar Category"</span>: [
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="new-hidden-sections"></a>New Hidden Sections <a class="hash-link" href="#new-hidden-sections">#</a></h2>
|
<h2><a class="anchor" name="new-hidden-sections"></a>New Hidden Sections <a class="hash-link" href="#new-hidden-sections">#</a></h2>
|
||||||
<p>You can also put the doc in a new sidebar. In this case we are creating a <code>intro</code> section within <code>sidebars.json</code>.</p>
|
<p>You can also put the doc in a new sidebar. In this case we are creating a <code>intro</code> section within <code>sidebars.json</code>.</p>
|
||||||
<pre><code>{
|
<pre><code class="hljs">{
|
||||||
<span class="hljs-string">"intro"</span>: {
|
<span class="hljs-string">"intro"</span>: {
|
||||||
<span class="hljs-string">"My Sidebar Category"</span>: [
|
<span class="hljs-string">"My Sidebar Category"</span>: [
|
||||||
<span class="hljs-string">"getting-started"</span>
|
<span class="hljs-string">"getting-started"</span>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
<p>Keep in mind, until you add the section to the nav bar (below), this new "intro" section of the site will be hidden with no links going to it.</p>
|
<p>Keep in mind, until you add the section to the nav bar (below), this new "intro" section of the site will be hidden with no links going to it.</p>
|
||||||
<h2><a class="anchor" name="adding-doc-to-site-nav-bar"></a>Adding doc to site nav bar <a class="hash-link" href="#adding-doc-to-site-nav-bar">#</a></h2>
|
<h2><a class="anchor" name="adding-doc-to-site-nav-bar"></a>Adding doc to site nav bar <a class="hash-link" href="#adding-doc-to-site-nav-bar">#</a></h2>
|
||||||
<p>After creating a new section of the site by adding to <code>sidebars.json</code>, you can link to the new doc from the top navigation bar by editing the <code>headerLinks</code> field of <code>siteConfig.js</code>.</p>
|
<p>After creating a new section of the site by adding to <code>sidebars.json</code>, you can link to the new doc from the top navigation bar by editing the <code>headerLinks</code> field of <code>siteConfig.js</code>.</p>
|
||||||
<pre><code>headerLinks: [
|
<pre><code class="hljs">headerLinks: [
|
||||||
...
|
...
|
||||||
{ doc: <span class="hljs-string">'intro'</span>, <span class="hljs-keyword">label</span><span class="bash">: <span class="hljs-string">'Getting Started'</span> },
|
{ doc: <span class="hljs-string">'intro'</span>, <span class="hljs-keyword">label</span><span class="bash">: <span class="hljs-string">'Getting Started'</span> },
|
||||||
</span> ...
|
</span> ...
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="custom-page-links-in-nav-bar"></a>Custom page links in nav bar <a class="hash-link" href="#custom-page-links-in-nav-bar">#</a></h2>
|
<h2><a class="anchor" name="custom-page-links-in-nav-bar"></a>Custom page links in nav bar <a class="hash-link" href="#custom-page-links-in-nav-bar">#</a></h2>
|
||||||
<p>To add custom pages to the navigation bar, entries can be added to the <code>headerLinks</code> of <code>siteConfig.js</code>. For example, if we have a page within <code>website/pages/help.js</code>, we can link to it by adding the following:</p>
|
<p>To add custom pages to the navigation bar, entries can be added to the <code>headerLinks</code> of <code>siteConfig.js</code>. For example, if we have a page within <code>website/pages/help.js</code>, we can link to it by adding the following:</p>
|
||||||
<pre><code>headerLinks: [
|
<pre><code class="hljs">headerLinks: [
|
||||||
...
|
...
|
||||||
{ page: <span class="hljs-string">'help'</span>, <span class="hljs-keyword">label</span><span class="bash">: <span class="hljs-string">'Help'</span> },
|
{ page: <span class="hljs-string">'help'</span>, <span class="hljs-keyword">label</span><span class="bash">: <span class="hljs-string">'Help'</span> },
|
||||||
</span> ...
|
</span> ...
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="external-links-in-nav-bar"></a>External links in nav bar <a class="hash-link" href="#external-links-in-nav-bar">#</a></h2>
|
<h2><a class="anchor" name="external-links-in-nav-bar"></a>External links in nav bar <a class="hash-link" href="#external-links-in-nav-bar">#</a></h2>
|
||||||
<p>Custom links can be added to the nav bar with the following entry in <code>siteConfig.js</code>:</p>
|
<p>Custom links can be added to the nav bar with the following entry in <code>siteConfig.js</code>:</p>
|
||||||
<pre><code>headerLinks: [
|
<pre><code class="hljs">headerLinks: [
|
||||||
...
|
...
|
||||||
{ href: <span class="hljs-string">'https://github.com/facebookexperimental/Docusaurus'</span>, <span class="hljs-keyword">label</span><span class="bash">: <span class="hljs-string">'GitHub'</span> },
|
{ href: <span class="hljs-string">'https://github.com/facebookexperimental/Docusaurus'</span>, <span class="hljs-keyword">label</span><span class="bash">: <span class="hljs-string">'GitHub'</span> },
|
||||||
</span> ...
|
</span> ...
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
<p>To open external links in a new tab, provide an <code>external: true</code> flag within the header link config.</p>
|
<p>To open external links in a new tab, provide an <code>external: true</code> flag within the header link config.</p>
|
||||||
<h2><a class="anchor" name="search-bar-position-in-nav-bar"></a>Search bar position in nav bar <a class="hash-link" href="#search-bar-position-in-nav-bar">#</a></h2>
|
<h2><a class="anchor" name="search-bar-position-in-nav-bar"></a>Search bar position in nav bar <a class="hash-link" href="#search-bar-position-in-nav-bar">#</a></h2>
|
||||||
<p>If search is enabled on your site, your search bar will appear to the right of your links. If you want to put the search bar between links in the header, add a search entry in the <code>headerLinks</code> config array:</p>
|
<p>If search is enabled on your site, your search bar will appear to the right of your links. If you want to put the search bar between links in the header, add a search entry in the <code>headerLinks</code> config array:</p>
|
||||||
<pre><code><span class="hljs-string">headerLinks:</span> [
|
<pre><code class="hljs"><span class="hljs-string">headerLinks:</span> [
|
||||||
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'foo'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Foo'</span> },
|
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'foo'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Foo'</span> },
|
||||||
{ <span class="hljs-string">search:</span> <span class="hljs-literal">true</span> },
|
{ <span class="hljs-string">search:</span> <span class="hljs-literal">true</span> },
|
||||||
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'bar'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Bar'</span> },
|
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'bar'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Bar'</span> },
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h2><a class="anchor" name="languages-dropdown-position-in-nav-bar"></a>Languages dropdown position in nav bar <a class="hash-link" href="#languages-dropdown-position-in-nav-bar">#</a></h2>
|
<h2><a class="anchor" name="languages-dropdown-position-in-nav-bar"></a>Languages dropdown position in nav bar <a class="hash-link" href="#languages-dropdown-position-in-nav-bar">#</a></h2>
|
||||||
<p>If translations is enabled on your site, the language dropdown will appear to the right of your links (and to the left of the search bar, if search is enabled). If you want to put the language selection drop down between links in the header, add a languages entry in the <code>headerLinks</code> config array:</p>
|
<p>If translations is enabled on your site, the language dropdown will appear to the right of your links (and to the left of the search bar, if search is enabled). If you want to put the language selection drop down between links in the header, add a languages entry in the <code>headerLinks</code> config array:</p>
|
||||||
<pre><code><span class="hljs-string">headerLinks:</span> [
|
<pre><code class="hljs"><span class="hljs-string">headerLinks:</span> [
|
||||||
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'foo'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Foo'</span> },
|
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'foo'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Foo'</span> },
|
||||||
{ <span class="hljs-string">languages:</span> <span class="hljs-literal">true</span> },
|
{ <span class="hljs-string">languages:</span> <span class="hljs-literal">true</span> },
|
||||||
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'bar'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Bar'</span> },
|
{ <span class="hljs-string">doc:</span> <span class="hljs-string">'bar'</span>, <span class="hljs-string">label:</span> <span class="hljs-string">'Bar'</span> },
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<pre><code class="hljs">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 class="hljs">yarn <span class="hljs-keyword">run</span><span class="bash"> build
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>This will generate <code>.html</code> files from all of your docs and other pages included in <code>pages</code>. The build folder is inside Docusaurus's directory inside <code>node_modules</code>.</p>
|
<p>This will generate <code>.html</code> files from all of your docs and other pages included in <code>pages</code>. The build folder is inside Docusaurus's directory inside <code>node_modules</code>.</p>
|
||||||
<h2><a class="anchor" name="hosting-static-html-pages"></a>Hosting Static HTML Pages <a class="hash-link" href="#hosting-static-html-pages">#</a></h2>
|
<h2><a class="anchor" name="hosting-static-html-pages"></a>Hosting Static HTML Pages <a class="hash-link" href="#hosting-static-html-pages">#</a></h2>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<li><code>CIRCLE_BRANCH</code>: The branch that contains the latest docs changes that will be deployed. Usually, "master".</li>
|
<li><code>CIRCLE_BRANCH</code>: The branch that contains the latest docs changes that will be deployed. Usually, "master".</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Once you have this information, you can go ahead and run the <code>publish-gh-pages</code> script like so (making sure to insert your own values inside the <code><placeholders></code>):</p>
|
<p>Once you have this information, you can go ahead and run the <code>publish-gh-pages</code> script like so (making sure to insert your own values inside the <code><placeholders></code>):</p>
|
||||||
<pre><code><span class="hljs-attribute">GIT_USER</span>=<GIT_USER> \
|
<pre><code class="hljs"><span class="hljs-attribute">GIT_USER</span>=<GIT_USER> \
|
||||||
<span class="hljs-attribute">CIRCLE_PROJECT_USERNAME</span>=<CIRCLE_PROJECT_REPONAME> \
|
<span class="hljs-attribute">CIRCLE_PROJECT_USERNAME</span>=<CIRCLE_PROJECT_REPONAME> \
|
||||||
<span class="hljs-attribute">CIRCLE_PROJECT_REPONAME</span>=<CIRCLE_PROJECT_USERNAME> \
|
<span class="hljs-attribute">CIRCLE_PROJECT_REPONAME</span>=<CIRCLE_PROJECT_USERNAME> \
|
||||||
<span class="hljs-attribute">CIRCLE_BRANCH</span>=master \
|
<span class="hljs-attribute">CIRCLE_BRANCH</span>=master \
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
<li>Create a new environment variable named "GITHUB_TOKEN", using your newly generated access token as the value.</li>
|
<li>Create a new environment variable named "GITHUB_TOKEN", using your newly generated access token as the value.</li>
|
||||||
<li>Open your <code>circle.yml</code> file and add the following under the <code>machine:</code> section to tell Circle to use relatively recent versions of node and npm, replacing npm with yarn if applicable:</li>
|
<li>Open your <code>circle.yml</code> file and add the following under the <code>machine:</code> section to tell Circle to use relatively recent versions of node and npm, replacing npm with yarn if applicable:</li>
|
||||||
</ol>
|
</ol>
|
||||||
<pre><code>machine:
|
<pre><code class="hljs">machine:
|
||||||
<span class="hljs-keyword">node</span><span class="hljs-title">:
|
<span class="hljs-keyword">node</span><span class="hljs-title">:
|
||||||
version</span>: <span class="hljs-number">6.11</span>.<span class="hljs-number">2</span>
|
version</span>: <span class="hljs-number">6.11</span>.<span class="hljs-number">2</span>
|
||||||
npm:
|
npm:
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<ol start="5">
|
<ol start="5">
|
||||||
<li>Then, add the following lines to the <code>deployment:</code> section. If you don't have a <code>deployment:</code> section, you can add it at the end of the file.</li>
|
<li>Then, add the following lines to the <code>deployment:</code> section. If you don't have a <code>deployment:</code> section, you can add it at the end of the file.</li>
|
||||||
</ol>
|
</ol>
|
||||||
<pre><code>deployment:
|
<pre><code class="hljs">deployment:
|
||||||
website:
|
website:
|
||||||
branch: master
|
branch: master
|
||||||
commands:
|
commands:
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<li>Place assets, such as images, in the <code>website/static/</code> folder.</li>
|
<li>Place assets, such as images, in the <code>website/static/</code> folder.</li>
|
||||||
<li>Run the site to see the results of your changes.</li>
|
<li>Run the site to see the results of your changes.</li>
|
||||||
</ol>
|
</ol>
|
||||||
<pre><code>cd website
|
<pre><code class="hljs">cd website
|
||||||
yarn <span class="hljs-builtin-name">run</span> start # <span class="hljs-keyword">or</span> - npm <span class="hljs-builtin-name">run</span> start
|
yarn <span class="hljs-builtin-name">run</span> start # <span class="hljs-keyword">or</span> - npm <span class="hljs-builtin-name">run</span> start
|
||||||
<span class="hljs-comment"># navigate to http://localhost:3000</span>
|
<span class="hljs-comment"># navigate to http://localhost:3000</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
|
@ -15,22 +15,22 @@
|
||||||
<pre><code class="hljs">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 class="hljs">yarn <span class="hljs-keyword">run</span><span class="bash"> examples
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>If any of the files created by <code>[yarn | npm] run examples</code> already exists, Docusaurus will not overwrite them.</p>
|
<p>If any of the files created by <code>[yarn | npm] run examples</code> already exists, Docusaurus will not overwrite them.</p>
|
||||||
</blockquote></li>
|
</blockquote></li>
|
||||||
<li><p>Run the server.</p>
|
<li><p>Run the server.</p>
|
||||||
<pre><code>npm <span class="hljs-keyword">run</span><span class="bash"> start
|
<pre><code class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> start
|
||||||
</span></code></pre>
|
</span></code></pre>
|
||||||
<p>or</p>
|
<p>or</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></li>
|
</span></code></pre></li>
|
||||||
<li><p>Load the example site at http://localhost:3000. You should see the example site loaded in your web browser.</p></li>
|
<li><p>Load the example site at http://localhost:3000. You should see the example site loaded in your web browser.</p></li>
|
||||||
</ol>
|
</ol>
|
||||||
<h2><a class="anchor" name="example-site-configuration"></a>Example Site Configuration <a class="hash-link" href="#example-site-configuration">#</a></h2>
|
<h2><a class="anchor" name="example-site-configuration"></a>Example Site Configuration <a class="hash-link" href="#example-site-configuration">#</a></h2>
|
||||||
<p>Loading the example site will create the following files/folders:</p>
|
<p>Loading the example site will create the following files/folders:</p>
|
||||||
<pre><code>website/core/Footer.js
|
<pre><code class="hljs">website/core/Footer.js
|
||||||
website/pages/...
|
website/pages/...
|
||||||
website/static/img/...
|
website/static/img/...
|
||||||
website/siteConfig.js
|
website/siteConfig.js
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
<pre><code class="hljs">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 class="hljs"><span class="hljs-attribute">yarn examples translations</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>This will create the following files:</p>
|
<p>This will create the following files:</p>
|
||||||
<pre><code>pages/en/help-with-translations<span class="hljs-selector-class">.js</span>
|
<pre><code class="hljs">pages/en/help-with-translations<span class="hljs-selector-class">.js</span>
|
||||||
languages<span class="hljs-selector-class">.js</span>
|
languages<span class="hljs-selector-class">.js</span>
|
||||||
crowdin<span class="hljs-selector-class">.yaml</span>
|
crowdin<span class="hljs-selector-class">.yaml</span>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue