Skip to content

Building Locally

Lori Krell edited this page Feb 8, 2021 · 7 revisions

We use Docusaurus v2 for our documentation site. All tools you need are part of the repository.

Docusaurus

You need to install the following only once to write and build locally:

  1. Install NodeJS: https://nodejs.org/en/download/
  2. Install Yarn. If you have Homebrew, use the command brew install yarn.
  3. Install Docusaurus. In terminal, cd to a location on your local. Enter this command to install Docusaurus (it installs and builds a temp project): npx @docusaurus/init@latest init temp classic.
  4. Let it run. When done, you should see a directory called temp with a project in it. Delete the directory, you do not need it.

Build Locally

  1. Update your local cloned GitHub repository.
  2. In a command line, change to the directory of the cloned repo.
  3. Install packages: npm install.
  4. Build the site: yarn build.
  5. Serve and run the site, hot reloading as you make changes in the code: yarn start.
  6. When done, it automatically opens a webpage at http://localhost:3000.

The build process includes a few tests for internal markdown links, source files, and images.

If you have issues, contact Lori Krell and other Unity writers in the Discord documentation channel.

Clone this wiki locally