Installation
Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly. To install Docusaurus, we have created an easy script that will get all of the infrastructure set up for you:
+Installation
Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly.
++ Installing Docusaurus
We have created an easy script that will get all of the infrastructure set up for you:
Ensure you have the latest version of Node installed. We also recommend you install Yarn as well.
You have to be on Node >= 8.x and Yarn >= 1.5.
-Go into the root of your GitHub repo directory where you will be creating the docs.
-
+npx docusaurus-init
Change directory to the root of your project's GitHub repo.
+You will be creating the docs in this directory. The root directory may +contain other files. The Docusaurus installation script will create two new +directories:
docs-examples-from-docusaurus
andwebsite
.
+Run the Docusaurus installation script:
npx docusaurus-init
.If you don't have Node 8.2+ or if you prefer to install Docusaurus globally, run
yarn global add docusaurus-init
ornpm install --global docusaurus-init
. After that, rundocusaurus-init
.
@@ -83,13 +88,19 @@
├── siteConfig.js
└── static
-- In your root, rename
docs-examples-from-docusaurus
todocs
.
- cd website
-- Rename
blog-examples-from-docusaurus
toblog
.
- - Run the local webserver via
yarn start
ornpm start
.
- - Load the example site at http://localhost:3000. You should see the example site loaded in your web browser. There's also a LiveReload server running and any changes made to the docs and files in the
website
directory will cause the page to refresh.
+ In your root, rename
docs-examples-from-docusaurus
todocs
.
+cd website
+Rename
blog-examples-from-docusaurus
toblog
.
+From within the
website
directory, run the local webserver using +yarn start
ornpm start
.
+Load the example site at http://localhost:3000 if it did not already open +automatically.
+You should see the example site loaded in your web browser. There's also a LiveReload server running and any changes made to the docs and files in the
website
directory will cause the page to refresh.
Running the Docusaurus initialization script, docusaurus-init
, produces a runnable, example website to base your site upon.
+ Running the example website
After running the Docusaurus initialization script, docusaurus-init
as
+described in the Installation section, you will have a
+runnable, example website to use as your site's base. To run:
-
-
@@ -98,7 +109,7 @@ yarn start (or npm run start) Launching the server behind a proxy
- Updating Your Docusaurus Version
After Docusaurus is installed, moving forward, you can check your current version of Docusaurus by going into the website
directory and typing yarn outdated docusaurus
or npm outdated docusaurus
.
At any time after Docusaurus is installed, you can check your current version of Docusaurus by going into the website
directory and typing yarn outdated docusaurus
or npm outdated docusaurus
.
You will see something like this:
$ yarn outdated
Using globally installed version of Yarn
@@ -125,7 +136,7 @@ docusaurus 1.0.9 1.2.0 1.2.0 devDependencies https:temporary directory or run the Docusaurus server (e.g., yarn start
) with the BABEL_DISABLE_CACHE=1
environment configuration.
-