|
| 1 | +--- |
| 2 | +sidebar_position: 3 |
| 3 | +--- |
| 4 | + |
| 5 | +Contributing |
| 6 | +============ |
| 7 | + |
| 8 | +How to contribute to the Joomla! documentation. First it's important to understand how to write documentation, |
| 9 | +which is handeled in the [Writing documentation](./writing.md) page. |
| 10 | + |
| 11 | +## Install Docusaurus Locally |
| 12 | + |
| 13 | +To install Docusaurus on your own machine you should initialise a local git repository and clone the manual from the |
| 14 | +forked copy in your GitHub repository into this git instance. |
| 15 | + |
| 16 | +Then change directory to your local git repository and do: |
| 17 | + |
| 18 | +```bash |
| 19 | +npm install |
| 20 | +``` |
| 21 | + |
| 22 | +Once Docusaurus is installed: |
| 23 | + |
| 24 | +```bash |
| 25 | +npm run start |
| 26 | +``` |
| 27 | + |
| 28 | +This command starts a local development server and opens up a browser window. |
| 29 | +Most changes are reflected live without having to restart the server. |
| 30 | + |
| 31 | +```bash |
| 32 | +npm run build |
| 33 | +``` |
| 34 | + |
| 35 | +This command generates static content into the `build` directory and can be served using any static contents hosting service. |
| 36 | + |
| 37 | +## Use GitHub dev |
| 38 | + |
| 39 | +To use GitHub dev go to your repository and press the "." (dot) key, as described within the |
| 40 | +[github.dev guide](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor). You can then: |
| 41 | + |
| 42 | +- create a new git branch for your changes |
| 43 | +- create new files and folders, modify and delete existing files, upload files |
| 44 | +- preview files (right-click on the file tab) - this will show interpreted markdown, but will not interpret Docusaurus additions |
| 45 | +- commit and push changes |
| 46 | +- return to GitHub repository (by clicking on GitHub in bottom left, or by replacing github.dev by github.com in the URL) |
| 47 | + |
| 48 | +## Pull Requests |
| 49 | + |
| 50 | +Once you raise a pull request on the [Joomla manual](https://github.com/joomla/Manual) a test build is run to identify |
| 51 | +any problems with your documentation. If you find a check has failed then click on the Details of the check which failed, |
| 52 | +and you can check the console logs to find the problem. |
| 53 | + |
| 54 | +When the build succeeds you will be able to see the result of your documentation changes by navigating to a |
| 55 | +URL like `https://branchname.manual-bku.pages.dev/`, where you replace branchname with the branch of your pull request. |
| 56 | +This link will be added to the "checks" section in the pull request as "preview". |
0 commit comments