-
Notifications
You must be signed in to change notification settings - Fork 203
Building Locally
Lori Krell edited this page Mar 23, 2021
·
7 revisions
We use Docusaurus v2 for our documentation site. All tools you need are part of the repository.
You need to install the following only once to write and build locally. We recommend Homebrew for easier commands.
- Install NodeJS: https://nodejs.org/en/download/
- Install Yarn:
brew install yarn
- 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
. - 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.
You need to install the following only once to write and build locally. We recommend Chocolatey for easier commands.
- Install NodeJS:
choco install nodejs.install
- Install Yarn:
choco install yarn
- Install Docusaurus:
yarn global add docusaurus-init
- Update your local cloned GitHub repository.
- In a command line, change to the directory of the cloned repo.
- Build the site:
yarn build
. - Serve and run the site, hot reloading as you make changes in the code:
yarn start
. - 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 need to install or update packages, use the yarn install
(installs packages) and yarn upgrade
(updates packages) commands.
If you have issues, contact Unity writers in the Discord documentation channel.
Unity Multiplayer Technology - Technical Docs