mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 00:27:21 +02:00
parent
acab313651
commit
a1ef13941f
12 changed files with 228 additions and 96 deletions
|
@ -82,6 +82,8 @@
|
|||
});
|
||||
</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/facebook/docusaurus/edit/master/docs/tutorial-setup.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Setting Up</h1></header><article><div><span><p>This tutorial is geared at first-time users who want detailed instructions on how to go from zero to a Docusaurus website that has versions. Let's start!</p>
|
||||
<p><img alt="Docusaurus campfire" src="/img/undraw_docusaurus_mountain.svg" class="docImage"/></p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="install-git"></a><a href="#install-git" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Install Git</h2>
|
||||
<p>Git is a version control system for tracking changes in source code during software development and it can help you synchronize and version files between your local system and your online repository. If not already installed, see <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git">Installing Git</a>.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="install-nodejs"></a><a href="#install-nodejs" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Install Node.js</h2>
|
||||
<p>Node.js is an environment that can run JavaScript code outside of a web browser and is used to write and run server-side JavaScript apps.</p>
|
||||
<blockquote>
|
||||
|
@ -103,28 +105,37 @@
|
|||
v8.15.1
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="install-yarn-optional"></a><a href="#install-yarn-optional" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Install Yarn (Optional)</h2>
|
||||
<p>We highly recommend you to install Yarn, an alternative package manager that has superb performance for managing your NPM dependencies. Check it out <a href="https://yarnpkg.com/en/docs/install">here</a>.</p>
|
||||
<p>We highly recommend that you install Yarn, an alternative package manager that has superb performance for managing your NPM dependencies. Check it out <a href="https://yarnpkg.com/en/docs/install">here</a>.</p>
|
||||
<blockquote>
|
||||
<p>You can still proceed with the tutorial without Yarn.</p>
|
||||
</blockquote>
|
||||
<h2><a class="anchor" aria-hidden="true" id="create-a-github-repository"></a><a href="#create-a-github-repository" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Create a GitHub Repository</h2>
|
||||
<h2><a class="anchor" aria-hidden="true" id="create-a-github-repository-and-local-clone"></a><a href="#create-a-github-repository-and-local-clone" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Create a GitHub repository and local clone</h2>
|
||||
<ol>
|
||||
<li>Go to <a href="https://github.com/">https://github.com/</a> and sign up for an account if you don't already have one.</li>
|
||||
<li>Click on <strong>"New Repository"</strong> or go to <a href="https://github.com/new">https://github.com/new</a>.</li>
|
||||
<li>Name your repository without spaces. For e.g. <code>docusaurus-tutorial</code>.</li>
|
||||
<li>Proceed to create the repository without adding <code>.gitignore</code> or a license.</li>
|
||||
<li>Click on the green <strong>New</strong> button or go to <a href="https://github.com/new">https://github.com/new</a>.</li>
|
||||
<li>Type a repository name without spaces. For example, <code>docusaurus-tutorial</code>.</li>
|
||||
<li>Click <strong>Create repository</strong> (without <code>.gitignore</code> and without a license).</li>
|
||||
</ol>
|
||||
<p><img alt="GitHub create repo" src="/img/tutorial-git-clone.png" class="docImage"/></p>
|
||||
<ol start="5">
|
||||
<li>In your terminal, <code>cd</code> to a directory where the local clone will be a subdirectory. (For help see <a href="https://tutorial.djangogirls.org/en/intro_to_command_line/">Introduction to the command-line interface</a>.)</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css language-sh"><span class="hljs-built_in">cd</span> /Users/USERNAME/doc_projects <span class="hljs-comment"># macOS example</span>
|
||||
<span class="hljs-comment"># or</span>
|
||||
<span class="hljs-built_in">cd</span> /c/USERNAME/doc_projects <span class="hljs-comment"># Windows example</span>
|
||||
</code></pre>
|
||||
<ol start="6">
|
||||
<li>Clone your repository to your local machine:</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css language-sh">git <span class="hljs-built_in">clone</span> git@github.com:USERNAME/docusaurus-tutorial.git <span class="hljs-comment"># SSH</span>
|
||||
<span class="hljs-comment"># or</span>
|
||||
git <span class="hljs-built_in">clone</span> https://github.com/USERNAME/docusaurus-tutorial.git <span class="hljs-comment"># HTTPS</span>
|
||||
</code></pre>
|
||||
<ol start="6">
|
||||
<li><code>cd</code> into the repository which you just created.</li>
|
||||
<ol start="7">
|
||||
<li><code>cd</code> to the directory for the local clone.</li>
|
||||
</ol>
|
||||
<pre><code class="hljs css language-sh"><span class="hljs-built_in">cd</span> docusaurus-tutorial
|
||||
</code></pre>
|
||||
<h2><a class="anchor" aria-hidden="true" id="install-the-docusaurus-init-command"></a><a href="#install-the-docusaurus-init-command" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Install the Docusaurus init command</h2>
|
||||
<p>Docusaurus comes with a command line tool to help you scaffold a Docusaurus site with some example templates. Let's install the installer!</p>
|
||||
<ol>
|
||||
|
@ -135,7 +146,7 @@ git <span class="hljs-built_in">clone</span> https://github.com/USERNAME/docusau
|
|||
<p>or if you have Yarn:</p>
|
||||
<pre><code class="hljs css language-sh">yarn global add docusaurus-init
|
||||
</code></pre>
|
||||
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 2019-5-17 by TurekBot</em></div><div class="docs-prevnext"><a class="docs-next button" href="/docs/en/next/tutorial-create-new-site"><span>Create a New Site</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#install-nodejs">Install Node.js</a></li><li><a href="#check-your-nodejs-installation">Check your Node.js installation</a></li><li><a href="#install-yarn-optional">Install Yarn (Optional)</a></li><li><a href="#create-a-github-repository">Create a GitHub Repository</a></li><li><a href="#install-the-docusaurus-init-command">Install the Docusaurus init command</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
</span></div></article></div><div class="docLastUpdate"><em>Last updated on 2019-7-25 by Jay Martin</em></div><div class="docs-prevnext"><a class="docs-next button" href="/docs/en/next/tutorial-create-new-site"><span>Create a New Site</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#install-git">Install Git</a></li><li><a href="#install-nodejs">Install Node.js</a></li><li><a href="#check-your-nodejs-installation">Check your Node.js installation</a></li><li><a href="#install-yarn-optional">Install Yarn (Optional)</a></li><li><a href="#create-a-github-repository-and-local-clone">Create a GitHub repository and local clone</a></li><li><a href="#install-the-docusaurus-init-command">Install the Docusaurus init command</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/en/installation">Getting Started</a><a href="
|
||||
/docs/en/versioning">Versioning</a><a href="
|
||||
/docs/en/translation">Localization</a><a href="
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue