Setting Up
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!
+ Install Git
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 Installing Git.
Install Node.js
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.
@@ -103,28 +105,37 @@ v8.15.1- Install Yarn (Optional)
We highly recommend you to install Yarn, an alternative package manager that has superb performance for managing your NPM dependencies. Check it out here.
+We highly recommend that you install Yarn, an alternative package manager that has superb performance for managing your NPM dependencies. Check it out here.
-You can still proceed with the tutorial without Yarn.
+ Create a GitHub Repository
Create a GitHub repository and local clone
- Go to https://github.com/ and sign up for an account if you don't already have one.
-- Click on "New Repository" or go to https://github.com/new.
-- Name your repository without spaces. For e.g.
-docusaurus-tutorial
.- Proceed to create the repository without adding
+.gitignore
or a license.- Click on the green New button or go to https://github.com/new.
+- Type a repository name without spaces. For example,
+docusaurus-tutorial
.- Click Create repository (without
.gitignore
and without a license).
+
+- In your terminal,
+cd
to a directory where the local clone will be a subdirectory. (For help see Introduction to the command-line interface.)+
cd /Users/USERNAME/doc_projects # macOS example +# or +cd /c/USERNAME/doc_projects # Windows example +
- Clone your repository to your local machine:
-
git clone git@github.com:USERNAME/docusaurus-tutorial.git # SSH # or git clone https://github.com/USERNAME/docusaurus-tutorial.git # HTTPS
-
- +
cd
into the repository which you just created.+
+cd
to the directory for the local clone.
cd docusaurus-tutorial +
Install the Docusaurus init command
Docusaurus comes with a command line tool to help you scaffold a Docusaurus site with some example templates. Let's install the installer!
@@ -135,7 +146,7 @@ git clone https://github.com/USERNAME/docusau
or if you have Yarn:
-yarn global add docusaurus-init