You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-12
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,22 @@ resources for others to make use of.
27
27
If you plan to contribute, then you may wish to setup a local development
28
28
environment to make it easier to do so.
29
29
30
-
We highly recommend that you read our [documentation contributions guide](https://moodledev.io/general/documentation/contributing), which includes important information on [getting started](https://moodledev.io/general/documentation/contributing#development).
30
+
We highly recommend that you read our [documentation contributions guide](https://moodledev.io/general/documentation/contributing), which includes important information on [getting started](https://moodledev.io/general/documentation/contributing#getting-started).
31
+
32
+
### Installation
33
+
34
+
For more information on the installation process see our [installation documentation](https://moodledev.io/general/documentation/installation), but if you want to jump right in then the easiest way is using [NVM](https://github.com/nvm-sh/nvm) and then running:
35
+
36
+
```
37
+
nvm install
38
+
npm i -g yarn
39
+
yarn
40
+
yarn start
41
+
```
31
42
32
43
### Building your content
33
44
34
-
During development you will almost certainly want to use the yarn development
35
-
server, however you will sometimes need to build the content to use certain
45
+
During development you will almost certainly want to use the yarn development server, however you will sometimes need to build the content to use certain
36
46
features.
37
47
38
48
This is easily achieved with yarn:
@@ -41,15 +51,9 @@ This is easily achieved with yarn:
41
51
yarn build
42
52
```
43
53
44
-
This command will compile all of the documentation into static HTML files
45
-
complete with all appropriate resources.
54
+
This command will compile all of the documentation into static HTML files complete with all appropriate resources.
46
55
47
-
As part of this build, the validity of all internal links will be checked. For
48
-
this reason we strongly recommend building the content locally before submitting
49
-
a pull request as broken internal links will lead to a build failure
56
+
As part of this build, the validity of all internal links will be checked. For this reason we strongly recommend building the content locally before submitting a pull request as broken internal links will lead to a build failure
50
57
immediately.
51
58
52
-
You may also need to configure the build to view it locally. This can be
53
-
achieved using a `.env` file in the project root.
54
-
For more information on the format of the `.env` file, see the documentation in
55
-
the `.env.default` file.
59
+
You may also need to configure the build to view it locally. This can be achieved using a `.env` file in the project root. For more information on the format of the `.env` file, see the documentation in the `.env.default` file.
Copy file name to clipboardExpand all lines: general/documentation/contributing.md
+18-43
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,23 @@ Anyone can get involved with, and add to, these resources - you don't have to be
33
33
34
34
If you need help, please reach out to us and we will do our best to advise you.
35
35
36
+
## Getting started
37
+
38
+
Our documentation is built using [Docusaurus](https://docusarus.io), a powerful open source documentation project written in JavaScript. For more detailed information, see our [installation guide](./installation.md) to install your development environment and get started.
39
+
40
+
:::tip
41
+
42
+
If you're eager to jump in, then the fastest way to set up your development environment is to have [NVM](https://github.com/nvm-sh/nvm) installed and then run:
43
+
44
+
```console
45
+
nvm install
46
+
npm i -g yarn
47
+
yarn
48
+
yarn start
49
+
```
50
+
51
+
:::
52
+
36
53
### Migrating legacy docs
37
54
38
55
We are currently migrating documentation from our [legacy documentation site](https://docs.moodle.org/dev), and one of the best ways to contribute with documentation is to help with this migration process.
@@ -160,48 +177,6 @@ If you only wish to make a small change, you may want to use the [GitHub Edit in
160
177
161
178
## Development
162
179
163
-
Our documentation is built using [Docusaurus](https://docusarus.io), a powerful open source documentation project written in JavaScript.
164
-
165
-
It's easy to get your development environment set up using [Yarn](https://yarnpkg.com/), and we we recommend that you use [NVM](https://github.com/nvm-sh/nvm) for your NodeJS version management. You can check our [.nvmrc](https://github.com/moodle/devdocs/blob/main/.nvmrc) for the best version of NodeJS to use.
166
-
167
-
We also have a [Gitpod](#Quick-start-with-Gitpod) configuration if you want to jump straight in and have a go
168
-
169
-
### Installation
170
-
171
-
If you contribute regularly to our documentation, then we recommend you setup a local development environment for the best results.
172
-
173
-
To set up a local development environment:
174
-
175
-
1. Ensure you have:
176
-
1.[NVM](https://github.com/nvm-sh/nvm)
177
-
1. The most appropriate version of NodeJS by running `nvm install`
178
-
1.[Yarn](https://yarnpkg.com/)
179
-
1. After cloning the repository, run `yarn install` in the root of the repository. This will install all dependencies as well as build all local packages.
180
-
1. To start a development server, run `yarn start`.
181
-
182
-
### Quick start with Gitpod
183
-
184
-
Gitpod is a free, cloud-based, development environment providing VS Code and a suitable development environment right in your browser.
185
-
186
-
By [launching your workspace](https://gitpod.io/#https://github.com/moodle/devdocs) you can automatically:
187
-
188
-
- clone our devdocs repo
189
-
- install all dependencies
190
-
- run `yarn start`
191
-
192
-
You can write and preview your contributions from right within your browser, and
193
-
even commit them and create a pull request.
194
-
195
-
[](https://gitpod.io/#https://github.com/moodle/devdocs)
196
-
197
-
GitHub has also launched their own lightweight online editor which integrates tightly with GitHub. Take a look at [github.dev](https://github.dev/moodle/devdocs).
198
-
199
-
:::info
200
-
201
-
Gitpod is an alternative to local development and completely optional. We recommend [setting up a local development environment](#installation) if you plan to contribute regularly.
202
-
203
-
:::
204
-
205
180
### Style guidelines
206
181
207
182
A set of writing and coding style guidelines for this documentation will be documented in more detail in the [style guides](./style-guides.md).
@@ -212,7 +187,7 @@ See our [linting and spelling](./linting.md) documentation for more information
212
187
213
188
:::
214
189
215
-
## Pull Requests
190
+
###Pull Requests
216
191
217
192
All pull requests should be opened against the `main` branch, and pushed to your own GitHub fork of the repository.
description: Information on how to install dependencies to start your development
4
+
tags:
5
+
- contributing
6
+
- documentation
7
+
- guide
8
+
- installation
9
+
- getting started
10
+
- quick start
11
+
sidebar_position: 3
12
+
---
13
+
14
+
Our documentation is built using [Docusaurus](https://docusarus.io), a powerful open source documentation project written in JavaScript.
15
+
16
+
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](#local-development) for the best results. If you're only planning to contribute as a once-off then you may want to consider trying [Gitpod](#quick-start-with-gitpod).
17
+
18
+
## Installation
19
+
20
+
### Local development
21
+
22
+
To set up a local development environment we recommend install [NVM](https://github.com/nvm-sh/nvm), and then running:
23
+
24
+
```console
25
+
nvm install
26
+
npm i -g yarn
27
+
yarn
28
+
```
29
+
30
+
:::note
31
+
32
+
From time to time you may need to repeat this process as we update the NodeJS version requirements or add dependencies.
33
+
34
+
:::
35
+
36
+
### Quick start with Gitpod
37
+
38
+
Gitpod is a free, cloud-based, development environment providing VS Code and a suitable development environment right in your browser.
39
+
40
+
By [launching your workspace](https://gitpod.io/#https://github.com/moodle/devdocs) you can automatically:
41
+
42
+
- clone our devdocs repo
43
+
- install all dependencies
44
+
- run `yarn start`
45
+
46
+
You can write and preview your contributions from right within your browser, and
47
+
even commit them and create a pull request.
48
+
49
+
[](https://gitpod.io/#https://github.com/moodle/devdocs)
50
+
51
+
GitHub has also launched their own lightweight online editor which integrates tightly with GitHub. Take a look at [github.dev](https://github.dev/moodle/devdocs).
52
+
53
+
:::info
54
+
55
+
Gitpod is an alternative to local development and completely optional. We recommend [setting up a local development environment](#installation) if you plan to contribute regularly.
56
+
57
+
:::
58
+
59
+
## Useful commands
60
+
61
+
### Starting the development server
62
+
63
+
```console
64
+
yarn start
65
+
```
66
+
67
+
### Building the docs and serving them locally
68
+
69
+
```console
70
+
yarn build
71
+
yarn serve
72
+
```
73
+
74
+
### Migrating a document
75
+
76
+
For full documentation on document migration see the [notes on contributing](./contributing.md#migrating-legacy-docs)
0 commit comments