How to document an extension
This chapter explains how to write documentation for a new extension.
This guide uses the example extension manual as a template for starting out.
Rendering the documentation locally
Use the following Docker command to render your documentation guide locally:
docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation
Open the file saved to Documentation-
in a
browser of your choice.
The Render documentation with the TYPO3 theme has more information.
Use the init command to create the Documentation folder
The following Docker command helps you to create some basic documentation
including the required configuration file Documentation/
:
docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest init
The command creates a folder Documentation
in the directory it is called
from. This should be the root directory of your extension containing the
composer.json.
Follow the interactive dialoge. We suggest to use the option ReStructuredText (rst) as this format provides the full power of the TYPO3 documentation theme. Using Markdown (md) is an option for simple and quick one page documentation.
If your extension offers a main Site set enter its name and path when prompted. This will regenerate ready to use documentation about configuration for you. If you have more then one set you can document the other sets manually. If you have no set, you need to write the chapter your self.
Make changes and try rendering the new documentation.
To publish your documentation to https://docs.typo3.org a webhook needs to be added on GitHub, Bitbucket or GitLab. A member of the Documentation Team has to approve your new documentation guide for publishing. In case the Team has questions, please follow the thread generated for your extension in the TYPO3 slack organization in channel #typo3-documentation.
Version numbers
docs.typo3.org does no longer show three level version numbers in form of Major.Minor.Patch
.
Only the first two levels are shown Major.Minor
.
This reduces the amount of documentation while keeping relevant information, as patch levels should not introduce breaking changes or new features.
Supported branches
The rendering supports two branches within repositories:
main
/master
-
Should contain the current development state, used for upcoming release. Every push to these branches triggers a new rendering, available at
https://
.docs. typo3. org/ p/<vendor>/<package>/ main/ en- us/ Both branch names are supported, but result in the same URL. Please use
main
,master
is only supported for backward compatibility. documentation-draft
-
Should contain a draft of the documentation. Every push to this branch triggers a new rendering, available at
https://
(same URL as main, except main is replaced by draft).docs. typo3. org/ p/<vendor>/<package>/ draft/ en- us/ This is not indexed by search engines. This branch can be used to test rendering before releasing a new version of an extension.
In order to test a different rendering, remove the branch, and create it again.