Skip to content

Commit 97d4d99

Browse files
authored
Merge branch 'main' into adapter-removed
2 parents 7ec3031 + 35845cc commit 97d4d99

File tree

1,525 files changed

+98198
-5831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,525 files changed

+98198
-5831
lines changed

.drone.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ clone:
66

77
steps:
88
- name: build
9-
image: node:18-bullseye-slim
9+
image: node:20-bookworm-slim
1010
commands:
1111
- npm install
1212
- npm run build
@@ -16,26 +16,25 @@ steps:
1616
depends_on:
1717
- build
1818
environment:
19-
REMOTE_PRIVATE_KEY:
20-
from_secret: REMOTE_PRIVATE_KEY
21-
developer_host:
22-
from_secret: developer_host
23-
sftp_user:
24-
from_secret: sftp_user
19+
CLOUDFLARE_ACCOUNT_ID:
20+
from_secret: CLOUDFLARE_ACCOUNT_ID
21+
CLOUDFLARE_API_TOKEN:
22+
from_secret: CLOUDFLARE_API_TOKEN
2523
GITHUB_TOKEN:
2624
from_secret: github_token
2725
commands:
28-
- mkdir -p ~/.ssh
29-
- eval $(ssh-agent -s)
30-
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
31-
- echo "$REMOTE_PRIVATE_KEY" > ~/.ssh/id_rsa
32-
- chmod 600 ~/.ssh/id_rsa
33-
- ssh-add
34-
- rclone config create server sftp host $developer_host user $sftp_user port 22
35-
- if [ -z "$${DRONE_PULL_REQUEST}" ]; then export TARGET=public_html; else export TARGET=wildcard.manual.joomlacode.org/sites/pr-$${DRONE_PULL_REQUEST}; fi
36-
- rclone -v sync build server:$TARGET
26+
- echo "Prepare Workaround for trailing slashes bug https://github.com/facebook/docusaurus/issues/6282 on Cloudflare Pages"
27+
- >
28+
for f in build/assets/files/*; do
29+
[ -f "$f" ] || continue;
30+
filename=$(basename "$f");
31+
echo "/assets/files/$filename/ /assets/files/$filename 301";
32+
done > build/_redirects
33+
- node_modules/.bin/wrangler pages deploy ./build --commit-dirty=true --project-name manual --branch="$${DRONE_SOURCE_BRANCH}" | tee /tmp/output.log
34+
- export PREVIEW_UNIQUE_URL=`grep Deployment /tmp/output.log | awk '{ print $9 }'`
35+
- export PREVIEW_URL=`grep "Deployment alias URL" /tmp/output.log | awk '{ print $5 }'`
3736
- chmod +x test.sh
38-
- if [ ! -z "$${DRONE_PULL_REQUEST}" ]; then /bin/add_github_status.sh "Preview" "Generated preview for this pull request" "http://pr-$${DRONE_PULL_REQUEST}.manual.joomlacode.org" ; fi;
37+
- if [ ! -z "$${DRONE_PULL_REQUEST}" ]; then /bin/add_github_status.sh "Preview" "Generated preview for this pull request" "$${PREVIEW_URL}" ; fi;
3938
when:
4039
branch:
4140
main
@@ -47,6 +46,6 @@ steps:
4746

4847
---
4948
kind: signature
50-
hmac: 3d1303abd175ffda3aec141c6ea71d541f50f3c3e0752a68330fde5560386a58
49+
hmac: fd23674d231f74d54696c996b77acceb14a19d2d5d800c7050bdaee2f9be5b4b
5150

5251
...

LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
JEDL
2+
====
3+
4+
Below is a license granting you rights to use, modify and distribute documentation associated with the Joomla! project. It is designed to foster wide electronic distribution of Joomla! documentation while ensuring that any material added to the documentation by you or others can be taken up and made part of the authoritative documentation distributed by the Joomla! project.
5+
The license that appears below is not the only way to get permission to use Joomla! documentation. If you want to publish Joomla! documentation in a manner not permitted by this license (i.e. in a printed book), please contact the Joomla! project.
6+
Although the license is called the "Joomla! Electronic Documentation License", you are encouraged to use it for works not associated with Joomla! and for things other than documentation.
7+
The license itself is copyright 2007 Open Source Matters, Inc., and you have permission to make verbatim copies of it.
8+
9+
10+
Joomla! Electronic Documentation License v 1.0
11+
==============================================
12+
13+
## Definitions
14+
15+
To "Propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except displaying or modifying a private copy.
16+
The "Work" is any copyrightable material licensed under the terms of this license or any material based on such material. The "Author" means all the people or entities who have the legal right to grant permission to Propagate the Work or parts of the Work. Each licensee is addressed as "you".
17+
"Electronic Media" means any device, medium or technology used to store, record, display, transmit or modify electronic information, including websites, compact discs, digital video discs, hard disks, magnetic media, and computer networks. "Electronic Media" does not include, for example, books printed on paper.
18+
"Grantback License" means a non-exclusive, perpetual, worldwide, royalty-free license to Propagate the Work in any medium and by any means.
19+
"Copyleft License" means a license to Propagate the Work under the terms of this license or any future version of the Joomla Electronic Documentation License published by Open Source Matters, Incorporated.
20+
The "Source Form" of a work means the preferred form of the Work for making modifications to it. For text works, this could be plain ASCII text format.
21+
22+
## Conditional Permissions
23+
24+
If you grant a Grantback License to the Author and a Copyleft License to anybody who comes into possession of the Work, you may Propagate the Work via Electronic Media for any purpose, including commercial purposes.
25+
You must make available at no charge, to anybody to whom you distribute the Work, a version of the Work in Source Form. Such availability must be via either (1) the same means and method with which you distribute the Work or (2) simple download over the internet. You may not condition providing the Source Form of the Work on anything other than acceptance of this license.
26+
You must provide a copy of this license, notice that it applies to the Work, and information needed to acquire the Source Form to anybody to whom you distribute the Work.
27+
You must preserve the Author's copyright notices in the Work and display them as prominently as you display your own.
28+
## Reservations of Rights
29+
30+
Nothing in this license grants you or anybody else any right to Propagate the Work in any medium or through any means other than Electronic Media.
31+
Nothing in this license grants you or anybody else any right to do anything that requires permission under trademark law. Specifically, nothing in this license grants you permission to represent that the Work is "official" or in any way endorsed or sanctioned by the Authors.

README.md

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

55
The Documentation can be found at [https://manual.joomla.org](https://manual.joomla.org)
66

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

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.
9+
This manual is self documenting, you can find the documentation at
10+
[manual.joomla.org/about](https://manual.joomla.org/about/).
1011

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:
26-
27-
```
28-
$ npm install
29-
```
30-
31-
Once Docusaurus is installed:
32-
33-
```
34-
$ npm run start
35-
```
36-
37-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
38-
39-
```
40-
$ npm run build
41-
```
42-
43-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
44-
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-
54-
### Preview for pull request
55-
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.
58-
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".
61-
62-
### Versions
63-
64-
The Joomla Manual contains documentation for multiple versions of the Joomla software.
65-
66-
The mapping between the versions of the manual in github and the live manual is:
67-
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") |
72-
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-
Don't use subdirectory names which match somewhat the parent directory name. For example, avoid `./install-update/install/`, as this can cause docusaurus to report broken links.
95-
96-
### Docusaurus Additions
97-
98-
You won't see the effect of these when you preview the Markdown text, but you will see them by previewing the Pull Request.
99-
100-
[Front Matter](https://docusaurus.io/docs/next/markdown-features#front-matter) should be used for titles and position in the left-hand sidebar:
101-
102-
```
103-
---
104-
title: Best Practices
105-
sidebar-position: 2
106-
---
107-
```
108-
109-
[Code blocks](https://docusaurus.io/docs/next/markdown-features/code-blocks) are enclosed in 3 backticks, and can have a title:
110-
```php title="hello.php"
111-
public static function hello()
112-
{
113-
echo "Hello!";
114-
}
115-
```
116-
Line numbering and highlighting of individual lines are also supported.
117-
118-
To aid readability of the markdown please leave a blank line before and after code blocks.
119-
120-
[Admonitions](https://docusaurus.io/docs/next/markdown-features/admonitions)
121-
We don't use blank lines around content, and we add 2 spaces before the text messages.
122-
123-
```
124-
:::note[Developer Note]
125-
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
126-
:::
127-
128-
:::note[Joomla Issue]
129-
For issues that affect the documentation - please link to the issue on the Joomla Issue Tracker
130-
:::
131-
132-
:::tip
133-
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
134-
:::
135-
136-
:::info
137-
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
138-
:::
139-
140-
:::warning
141-
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
142-
:::
143-
144-
:::danger
145-
Some **content** with _Markdown_ `syntax`. Check [this `api`](#).
146-
:::
147-
```
148-
149-
Please use the following placeholder for unfinished sections of a document.
150-
151-
```
152-
:::note[TODO]
153-
This section is missing, please use the **Edit this Page** link at the bottom of this page to add this section.
154-
:::
155-
```
156-
157-
If the page is not completed yet and bigger parts are missing use
158-
159-
```
160-
:::caution[TODO]
161-
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
162-
:::
163-
```
164-
165-
### Diagrams
166-
167-
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.
168-
169-
Images, code zip files, etc should be held in a folder `_assets` at the point in the documentation where they're used.
170-
171-
### Other Recommendations
172-
173-
#### Header Levels - just one H1
174-
175-
To align with a11y requirements for accessibility, please don't have more than one header level 1:
176-
177-
```
178-
# Just One H1
179-
```
180-
181-
#### API Docs Links
182-
183-
If you link to the Joomla API docs then the URL of the API depends on the version of the manual documentation. For example, for Joomla 4.4 documentation the User API is at [https://api.joomla.org/cms-4/classes/Joomla-CMS-User-User.html](https://api.joomla.org/cms-4/classes/Joomla-CMS-User-User.html), but for Joomla 5.x documentation it is [https://api.joomla.org/cms-5/classes/Joomla-CMS-User-User.html](https://api.joomla.org/cms-5/classes/Joomla-CMS-User-User.html).
184-
185-
This is similar for Framework classes, eg [https://api.joomla.org/framework-3/classes/Joomla-Registry-Registry.html](https://api.joomla.org/framework-3/classes/Joomla-Registry-Registry.html), which is also dependent upon the documentation version.
186-
187-
As this creates a maintainability issue a plugin has been developed which automatically selects the appropriate API docs version, and you should use this plugin by specifying API docs links like the following examples:
188-
189-
```
190-
cms-api://classes/Joomla-CMS-User-User.html
191-
framework-api://classes/Joomla-Registry-Registry.html
192-
```
193-
194-
The plugin will replace `cms-api://` or `framework-api://` with the correct URL section.
12+
The markdown files for the this documentation are in the `about` folder.

about/contributing.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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

Comments
 (0)