Skip to content

Instantly share code, notes, and snippets.

@koji
Created March 23, 2018 20:20
Show Gist options
  • Save koji/487b990eb8e49c2617d1fcbe7fd9cd62 to your computer and use it in GitHub Desktop.
Save koji/487b990eb8e49c2617d1fcbe7fd9cd62 to your computer and use it in GitHub Desktop.
docusaurus setup
install docusaurus globally
$ yarn global add docusaurus-init
$ mkdir project
$ cd project
$ docusaurus-init

$ ls
docs-examples-from-docusaurus website

rename the folders
$ mv docs-examples-from-docusaurus docs
$ mv website/blog-examples-from-docusaurus website/blog

$ ls -l website
total 152
drwxr-xr-x    7 kj  staff    238 Mar 23 16:02 blog
drwxr-xr-x    3 kj  staff    102 Mar 23 16:02 core
drwxr-xr-x  271 kj  staff   9214 Mar 23 16:02 node_modules
-rw-r--r--    1 kj  staff    375 Mar 23 16:02 package.json
drwxr-xr-x    3 kj  staff    102 Mar 23 16:02 pages
-rw-r--r--    1 kj  staff    174 Dec  8 18:46 sidebars.json
-rw-r--r--    1 kj  staff   2005 Mar 12 20:01 siteConfig.js
drwxr-xr-x    4 kj  staff    136 Mar 23 16:02 static
-rw-r--r--    1 kj  staff  65144 Mar 23 16:02 yarn.lock

test
$ cd website
$ yarn start
yarn run v1.3.2
warning package.json: No license field
$ docusaurus-start
Starting Docusaurus server on port 3000...
Open http://localhost:3000/

create a version file
$ yarn examples versions

add a version
$ yarn run version 0.0.1

build 
$ yarn build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment