|
1 | | -# Website |
| 1 | +# LM-Commons Documentation Website |
2 | 2 |
|
3 | | -This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. |
| 3 | +The LM-Commons Documentation Website is built using [Docusaurus](https://docusaurus.io/). |
| 4 | + |
| 5 | +If you want to make a contribution to the documentation, please follow these |
| 6 | +instructions: |
| 7 | + |
| 8 | +1. Fork the `master` branch of this repository to your GitHub profile. Do not fork the `gh-pages` branch as it only contains the "built" version. |
| 9 | +2. Create a branch to work on your changes |
| 10 | +3. Test your changes locally (see below for instructions on how to use Docusaurus) |
| 11 | +4. Create a Pull Request against the `master` branch to submit your changes |
| 12 | + |
| 13 | + |
| 14 | +## Install and Develop with Docusaurus |
| 15 | + |
| 16 | +This is not a tutorial on how to use Docusaurus. Please refer to Docusaurus documentation. |
4 | 17 |
|
5 | 18 | ### Installation |
6 | 19 |
|
| 20 | +On your local fork of the LM-Commons Documentation, use `yarn` to install |
| 21 | +the Docusaurus dependencies. |
| 22 | + |
7 | 23 | ``` |
8 | 24 | $ yarn |
9 | 25 | ``` |
10 | 26 |
|
11 | 27 | ### Local Development |
12 | 28 |
|
13 | | -``` |
14 | | -$ yarn start |
15 | | -``` |
| 29 | +Once the dependencies are installed, you can make changes to the documentation source files. |
| 30 | + |
| 31 | +Typically, only the files located under `/docs`, `/src` and `/blog` should be changed. |
16 | 32 |
|
17 | | -This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. |
| 33 | +Changes to the navigation and footer are made to the `docusauraus.config.js` file. |
18 | 34 |
|
19 | | -### Build |
| 35 | +To test locally your changes, run: |
20 | 36 |
|
21 | 37 | ``` |
22 | | -$ yarn build |
| 38 | +$ yarn start |
23 | 39 | ``` |
24 | 40 |
|
25 | | -This command generates static content into the `build` directory and can be served using any static contents hosting service. |
26 | | - |
27 | | -### Deployment |
| 41 | +This command starts a local development server and opens up a browser window. Most changes are reflected live |
| 42 | +without having to restart the server. |
28 | 43 |
|
29 | | -Using SSH: |
| 44 | +## Test builds |
30 | 45 |
|
31 | | -``` |
32 | | -$ USE_SSH=true yarn deploy |
33 | | -``` |
| 46 | +A GitHub action is define to test builds. It will run on push to your fork. |
34 | 47 |
|
35 | | -Not using SSH: |
| 48 | +## Submit changes |
36 | 49 |
|
37 | | -``` |
38 | | -$ GIT_USER=<Your GitHub username> yarn deploy |
39 | | -``` |
| 50 | +Once you are satisfied with your changes and the `Build GitHub Pages No Deploy` action has |
| 51 | +passed successfully, then create and submit a Pull Request against the `master` branch of |
| 52 | +the repository. |
40 | 53 |
|
41 | | -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
|
0 commit comments