Skip to content

Commit 97f2e5b

Browse files
Merge branch 'joomla:main' into module-tutorial
2 parents 2b6c152 + d29c3dc commit 97f2e5b

File tree

5 files changed

+742
-32
lines changed

5 files changed

+742
-32
lines changed

README.md

Lines changed: 114 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,128 @@ This repository should hold all Joomla! documentation needed to develop extensio
44

55
The Documentation can be found at https://manual.joomla.org
66

7-
## Development
7+
## Contributing to the Joomla Manual
88

9-
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.
9+
This manual is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator. If you want to contribute to it then this page will help you get started.
1010

11-
### Installation
11+
Updates to the documentation is managed via this repository, so you should initially fork it into your own github account.
12+
Then you can make changes to the documentation files and submit a pull request to the Joomla manual.
13+
Ensure that you continue to sync your fork branches with the Joomla manual `main` branch.
14+
15+
The documentation uses the [Markdown](https://www.markdownguide.org/) syntax, with additional features which Docusaurus provides.
16+
17+
To make documentation changes you'll probably find it easiest to use one of two options:
18+
1. Install Docusaurus on your own machine, and make changes there
19+
2. Use [github dev](https://github.com/github/dev) to make the changes on the github server.
20+
21+
### Install Docusaurus Locally
22+
23+
To install Docusaurus on your own machine you should initialise a local git repository and clone the manual from the forked copy in your githut repository into this git instance.
24+
25+
Then change directory to your local git repository and do:
1226

1327
```
1428
$ npm install
1529
```
1630

17-
### Local Development
31+
Once Docusaurus is installed:
1832

1933
```
2034
$ npm run start
2135
```
2236

2337
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
2438

25-
### Build
26-
2739
```
2840
$ npm run build
2941
```
3042

3143
This command generates static content into the `build` directory and can be served using any static contents hosting service.
3244

45+
### Use github dev
46+
47+
To use github dev go to your repository and press the "." (dot) key, as described within the [github.dev guide](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor). You can then:
48+
- create a new git branch for your changes
49+
- create new files and folders, modify and delete existing files, upload files
50+
- preview files (right-click on the file tab) - this will show interpreted markdown, but will not interpret Docusaurus additions
51+
- commit and push changes
52+
- return to github repository (by clicking on GitHub in bottom left, or by replacing github.dev by github.com in the URL)
53+
3354
### Preview for pull request
3455

35-
As part of the documentation validation we create a subdomain for previewing your pull request.
36-
The Link will be added to the "checks" section in the pull request as "preview". The url used
37-
is http://pr-[prnumber].manual.joomlacode.org
56+
Once you raise a pull request on the [Joomla manual](https://github.com/joomla/Manual) a test build is run to identify any problems with your documentation.
57+
If you find a check has failed then click on the Details of the check which failed, and you can check the console logs to find the problem.
3858

39-
## How to use
59+
When the build succeeds you will be able to see the result of your documentation changes by navigating to a URL like `http://pr-240.manual.joomlacode.org/docs/`, where you replace 240 with the number of your pull request.
60+
This link will be added to the "checks" section in the pull request as "preview".
4061

41-
### Unfinished sections
62+
### Versions
4263

43-
Please use the following placeholder for unfinished sections of a document.
64+
The Joomla Manual contains documentation for multiple versions of the Joomla software.
4465

45-
```
46-
:::note[TODO]
47-
This section is missing, please use the **Edit this Page** link at the bottom of this page to add this section.
48-
:::
49-
```
66+
The mapping between the versions of the manual in github and the live manual is:
5067

51-
If the page is not completed yet and bigger parts are missing use
68+
| github manual (development) | Live Docusaurus manual |
69+
| -------------------------------- | ---------------------- |
70+
| /docs | "upcoming" release (shown as /docs/next in the URL) |
71+
| /versioned_docs/version-m.n | version m.n (under "Current releases") |
5272

73+
If your documentation changes relate to multiple versions of Joomla then you should duplicate these changes into multiple versions of Joomla manual. These versions which are updated are currently agreed to be:
74+
- the version m.n of the latest full Joomla release ("latest" release)
75+
- the version m.n+1 of the next Joomla release ("upcoming" release)
76+
- the last version (m-1.last) of the Joomla previous major version
77+
78+
Other versions may be present within /versioned_docs but are not updated with the changes, even if the documentation is true for those Joomla versions.
79+
80+
To minimise changes it's recommended that you initially just make changes within the /docs area, and then raise the pull request.
81+
This allows team members to review the documentation, and for you to fix any issues without having to replicate changes to multiple versions.
82+
Then when the review process is complete the changes can be replicated to the other versions prior to merging.
83+
84+
Once the pull request is merged you can delete the branch on your own repository, and sync your `main` branch with the updated Joomla manual `main`.
85+
86+
### Common Build Problems
87+
88+
If you use angle brackets or curly brackets in text then always enclose these in backticks, like `<h1>` or `{['a':1, 'b':2]}`.
89+
90+
Don't use colons (:) in titles.
91+
92+
Don't use `<br>` to force a new line (eg in table text); use `<br/>` instead.
93+
94+
### Docusaurus Additions
95+
96+
You won't see the effect of these when you preview the Markdown text, but you will see them by previewing the Pull Request.
97+
98+
[Front Matter](https://docusaurus.io/docs/next/markdown-features#front-matter) should be used for titles and position in the left-hand sidebar:
5399
```
54-
:::caution[TODO]
55-
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
56-
:::
100+
---
101+
title: Best Practices
102+
sidebar-position: 2
103+
---
57104
```
58105

59-
### Using admonitions
106+
[Code blocks](https://docusaurus.io/docs/next/markdown-features/code-blocks) are enclosed in 3 backticks, and can have a title:
107+
```php title="hello.php"
108+
public static function hello()
109+
{
110+
echo "Hello!";
111+
}
112+
```
113+
Line numbering and highlighting of individual lines are also supported.
60114

61-
Full reference could be found at [Docusaurus documentation](https://docusaurus.io/docs/markdown-features/admonitions).
115+
To aid readability of the markdown please leave a blank line before and after code blocks.
116+
117+
[Admonitions](https://docusaurus.io/docs/next/markdown-features/admonitions)
62118
We don't use blank lines around content, and we add 2 spaces before the text messages.
63119

64120
```
65121
:::note[Developer Note]
66122
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
67123
:::
68124
125+
:::note[Joomla Issue]
126+
For issues that affect the documentation - please link to the issue on the Joomla Issue Tracker
127+
:::
128+
69129
:::tip
70130
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
71131
:::
@@ -81,4 +141,34 @@ We don't use blank lines around content, and we add 2 spaces before the text mes
81141
:::danger
82142
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
83143
:::
84-
```
144+
```
145+
146+
Please use the following placeholder for unfinished sections of a document.
147+
148+
```
149+
:::note[TODO]
150+
This section is missing, please use the **Edit this Page** link at the bottom of this page to add this section.
151+
:::
152+
```
153+
154+
If the page is not completed yet and bigger parts are missing use
155+
156+
```
157+
:::caution[TODO]
158+
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
159+
:::
160+
```
161+
162+
### Diagrams
163+
164+
Where possible, use [Mermaid](https://mermaid.live) for creating diagrams for inclusion in the documentation. Where Mermaid doesn't provide what you need, then please include the saved diagram from your drawing tool in addition to the image file.
165+
166+
Images, code zip files, etc should be held in a folder `_assets` at the point in the documentation where they're used.
167+
168+
### Other Recommendations
169+
170+
To align with a11y requirements for accessibility, please don't have more than one header level 1:
171+
172+
```
173+
# Just One H1
174+
```

docs/about/documentation.md

Lines changed: 157 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,162 @@
11
This documentation
22
==================
3-
:::caution TODO
43

5-
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
4+
This [Joomla development manual](https://manual.joomla.org/docs/) is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator. If you want to contribute to it then this page will help you get started.
65

6+
Updates to the documentation is managed via the [Joomla manual github repository](https://github.com/joomla/Manual), so you should initially fork this repository into your own github account. Then you can make changes to the documentation files and submit a pull request to the Joomla manual. Ensure that you continue to sync your fork branches with the Joomla manual `main` branch.
7+
8+
The documentation uses the [Markdown](https://www.markdownguide.org/) syntax, with additional features which Docusaurus provides.
9+
10+
To make documentation changes you'll probably find it easiest to use one of two options:
11+
1. Install Docusaurus on your own machine, and make changes there
12+
2. Use [github dev](https://github.com/github/dev) to make the changes on the github server.
13+
14+
## Install Docusaurus
15+
16+
To install Docusaurus on your own machine you should initialise a local git repository and clone the manual from the forked copy in your githut repository into this git instance.
17+
18+
Then change directory to your local git repository and issue:
19+
20+
```
21+
$ npm install
22+
```
23+
24+
Once Docusaurus is installed:
25+
26+
```
27+
$ npm run start
28+
```
29+
30+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
31+
32+
```
33+
$ npm run build
34+
```
35+
36+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
37+
38+
## Use github dev
39+
40+
To use github dev go to your repository and press the "." (dot) key, as described within the [github.dev guide](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor). You can then:
41+
- create a new git branch for your changes
42+
- create new files and folders, modify and delete existing files, upload files
43+
- preview files (right-click on the file tab) - this will show interpreted markdown, but will not interpret Docusaurus additions
44+
- commit and push changes
45+
- return to github repository (by clicking on GitHub in bottom left, or by replacing github.dev by github.com in the URL)
46+
47+
## Pull Requests
48+
49+
Once you raise a pull request on the [Joomla manual](https://github.com/joomla/Manual) a test build is run to identify any problems with your documentation. If you find a check has failed then click on the Details of the check which failed, and you can check the console logs to find the problem.
50+
51+
When the build succeeds you will be able to see the result of your documentation changes by navigating to a URL like `http://pr-240.manual.joomlacode.org/docs/`, where you replace 240 with the number of your pull request.
52+
This link will be added to the "checks" section in the pull request as "preview".
53+
54+
## Versions
55+
56+
The Joomla Manual contains documentation for multiple versions of the Joomla software.
57+
58+
The mapping between the versions of the manual in github and the live manual is:
59+
60+
| github manual (development) | Live Docusaurus manual |
61+
| -------------------------------- | ---------------------- |
62+
| /docs | "upcoming" release (shown as /docs/next in the URL) |
63+
| /versioned_docs/version-m.n | version m.n (under "Current releases") |
64+
65+
If your documentation changes relate to multiple versions of Joomla then you should duplicate these changes into multiple versions of Joomla manual. These versions which are updated are currently agreed to be:
66+
- the version m.n of the latest full Joomla release ("latest" release)
67+
- the version m.n+1 of the next Joomla release ("upcoming" release)
68+
- the last version (m-1.last) of the Joomla previous major version
69+
70+
Other versions may be present within /versioned_docs but are not updated with the changes, even if the documentation is true for those Joomla versions.
71+
72+
To minimise changes it's recommended that you initially just make changes within the /docs area, and then raise the pull request. This allows team members to review the documentation, and for you to fix any issues without having to replicate changes to multiple versions. Then when the review process is complete the changes can be replicated to the other versions prior to merging.
73+
74+
Once the pull request is merged you can delete the branch on your own repository, and sync your `main` branch with the updated Joomla manual `main`.
75+
76+
## Common Build Problems
77+
78+
If you use angle brackets or curly brackets in text then always enclose these in backticks, like `<h1>` or `{['a':1, 'b':2]}`.
79+
80+
Don't use colons (:) in titles.
81+
82+
Don't use `<br>` to force a new line (eg in table text); use `<br/>` instead.
83+
84+
## Docusaurus Additions
85+
86+
[Front Matter](https://docusaurus.io/docs/next/markdown-features#front-matter) should be used for titles and position in the left-hand sidebar:
87+
```
88+
---
89+
title: Best Practices
90+
sidebar-position: 2
91+
---
92+
```
93+
94+
[Code blocks](https://docusaurus.io/docs/next/markdown-features/code-blocks) are enclosed in 3 backticks, and can have a title:
95+
```php title="hello.php"
96+
public static function hello()
97+
{
98+
echo "Hello!";
99+
}
100+
```
101+
Line numbering and highlighting of individual lines are also supported.
102+
103+
To aid readability of the markdown please leave a blank line before and after code blocks.
104+
105+
[Admonitions](https://docusaurus.io/docs/next/markdown-features/admonitions)
106+
We don't use blank lines around content, and we add 2 spaces before the text messages.
107+
108+
```
109+
:::note[Developer Note]
110+
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
111+
:::
112+
113+
:::note[Joomla Issue]
114+
For issues that affect the documentation - please link to the issue on the Joomla Issue Tracker
115+
:::
116+
117+
:::tip
118+
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
119+
:::
120+
121+
:::info
122+
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
123+
:::
124+
125+
:::warning
126+
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
7127
:::
128+
129+
:::danger
130+
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
131+
:::
132+
```
133+
134+
Please use the following placeholder for unfinished sections of a document.
135+
136+
```
137+
:::note[TODO]
138+
This section is missing, please use the **Edit this Page** link at the bottom of this page to add this section.
139+
:::
140+
```
141+
142+
If the page is not completed yet and bigger parts are missing use
143+
144+
```
145+
:::caution[TODO]
146+
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
147+
:::
148+
```
149+
150+
## Diagrams
151+
152+
Where possible, use [Mermaid](https://mermaid.live) for creating diagrams for inclusion in the documentation. Where Mermaid doesn't provide what you need, then please include the saved diagram from your drawing tool in addition to the image file.
153+
154+
Images, code zip files, etc should be held in a folder `_assets` at the point in the documentation where they're used.
155+
156+
## Other Recommendations
157+
158+
To align with a11y requirements for accessibility, please don't have more than one header level 1:
159+
160+
```
161+
# Just One H1
162+
```

0 commit comments

Comments
 (0)