Installation
Our documentation is built using Docusaurus, a powerful open source documentation project written in JavaScript.
It's easy to get your development environment set up and if you plan to contribute regularly to our documentation, then we recommend you setup a local development environment for the best results. If you're only planning to contribute as a once-off then you may want to consider trying Gitpod.
Installation
Local development
To set up a local development environment we recommend install NVM, and then running:
nvm install
npm i -g yarn
yarn
From time to time you may need to repeat this process as we update the NodeJS version requirements or add dependencies.
Quick start with Gitpod
Gitpod is a free, cloud-based, development environment providing VS Code and a suitable development environment right in your browser.
By launching your workspace you can automatically:
- clone our devdocs repo
- install all dependencies
- run
yarn start
You can write and preview your contributions from right within your browser, and even commit them and create a pull request.
GitHub has also launched their own lightweight online editor which integrates tightly with GitHub. Take a look at github.dev.
Gitpod is an alternative to local development and completely optional. We recommend setting up a local development environment if you plan to contribute regularly.
Useful commands
Starting the development server
yarn start
Building the docs and serving them locally
yarn build
yarn serve
Migrating a document
For full documentation on document migration see the notes on contributing
yarn migrate [https://docs.moodle.org/dev/Old_doc_location] [newLocation]
Linting documents
yarn mdlint-all