Setup Local Environment
The following instructions describe how to set up your local environment for contributing to United Manufacturing Hub documentation website.
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:
- GNU make to easily run scripts
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 [email protected]:<user>/umh.docs.umh.app.git
<user> is your GitHub username, or
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 upstream https://github.com/united-manufacturing-hub/umh.docs.umh.app.git # Never push to upstream master git remote set-url --push upstream no_push
Setup the environment
If you are running on a Windows system, manually install the above required tools.
If you are running on a Linux system, or can run a bash shell, you can use the following commands to install the required tools:
cd <path_to_your_repo> make install
Run the development server
Now it’s time to run the server locally.
Navigate to the
umh.docs.umh.app directory inside the repository you cloned
If you have not installed GNU make, run the following command:
hugo server --buildDrafts
Otherwise, run the following command:
Either method 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.