Setup Local Environment
2 minute read
The following instructions describe how to set up your local environment for contributing to United Manufacturing Hub documentation website.
You can use any text editor to contribute to the documentation. However, we recommend using Visual Studio Code with the Markdown All in One extension. Additional extensions that can be useful are:
Requirements
The following tools are required to contribute to the documentation website. Use your preferred package manager to install them (for Windows users, we recommend using Chocolatey).
Other tools that are not required, but are recommended:
Fork the documentation repository
If you are not a member of the United Manufacturing Hub organization, you will need to fork the repository to your own GitHub account. This is done by clicking the Fork button in the top-right corner of the united-manufacturing-hub/umh.docs.umh.app repository page.
Clone the repository
Clone the repository to your local machine:
git clone https://github.com/<user>/umh.docs.umh.app.git
# or: git clone git@github.com:<user>/umh.docs.umh.app.git
Where <user>
is your GitHub username, or united-manufacturing-hub
if
you are a member of the United Manufacturing Hub organization.
If you are not a member of the United Manufacturing Hub organization, you will need to add the upstream repository as a remote:
git remote add origin https://github.com/united-manufacturing-hub/umh.docs.umh.app.git
# or: git remote add upstream git@github.com:united-manufacturing-hub/umh.docs.umh.app.git
# Never push to upstream master
git remote set-url --push origin no_push
Install dependencies
Install the required dependencies:
make module-init
Run the development server
To build and serve the website locally, run the following command:
make serve
This will start the local Hugo server on port 1313. Open up your browser to
http://localhost:1313
to view the website. As you make changes to the source
files, Hugo updates the website and forces a browser refresh.
You can stop the server by pressing Ctrl+C
in the terminal.
Other useful commands
Most of the commands are available as make
targets. To see the list of all
available commands, run:
make help
What’s next
- Learn how to write a new topic.
- Get an overview of the documentation style.