Note
This version of the guide covers the new PHP-based rendering of Documentation with the TYPO3 Documentation theme.
If the project you are looking at has a file Documentation/guides.xml it is using the new rendering.
Otherwise, consider to migrate the Documentation or head over to the legacy version of this guide: How to document, Sphinx based.
Webhook
This section describes how to add webhooks for auto rendering to a repository.
The system supports Git as VCS (Version Control System), and the following hosts:
- GitHub
- Bitbucket cloud and Bitbucket self-hosted
- GitLab Cloud and GitLab self-hosted
Table of Contents
Approval
In order to render documentation, the TYPO3 Documentation Team needs to approve each new extension when requesting rendering for the first time.
In order to approve an extension, the following things need to apply:
- The extension needs to be published in TER under the same extension key as claimed by composer.json.
- The Git Repository is referenced from TER detail view page.
This is necessary to prevent misuse of the infrastructure and extension names.
In case the approval takes too long, request the approval within the Slack channel #typo3-documentation. Registration for Slack is available at my.typo3.org.
Foreign setups
In some cases one might use a different host than the one mentioned above. Or the file structure does not match the structure of an TYPO3 extension.
In such cases a mirror to one of the supported hosts must be setup. Otherwise it is not possible to enable documentation rendering on docs.typo3.org.
How webhooks work
If it's your first time working with webhooks, take a look at GitHub developer. The configuration below triggers rendering only on push events.
In order to test the integration, a push to main
branch or
documentation-
branch can be used, see Supported branches.
Note
Documentation rendering is only triggered for versions affected by push event. Not the whole repository will be rendered each time. If a push event for branch 7.8 is triggered, only this version will be rendered.
Legacy webhook
If the repository already had a hook, this is considered deprecated. A compatibility layer is still in place, but will be removed in the future.
GitHub
Add auto rendering for a repository via GitHub webhook in five steps:
-
Go to "Settings" tab within the repository
-
Go to "Webhooks" section within the repository settings
-
Add webhook
-
Fill in webhook configuration
- Configure URL
https://
for field "Payload URL".docs- hook. typo3. org - Select
application/json
as "Content type". - Enable "SSL verification".
- Select
Just the push event.
for "Which events would you like to trigger this webhook?". - Enable "Active".
- Click on "Add webhook"
- Configure URL
-
Webhook was added
GitHub should show a notice that creation of webhook was successful.
-
Trigger webhook and visit to check request
Visit intercept.typo3.com and check "Recent actions" (scroll down). The repository should have created a "Docs hook ping from github repository".
For the documentation to be rendered, the hook needs to be triggered: Either push to the branch
main
. Or push to a new branchdocumentation-draft
.
Bitbucket cloud
Add auto rendering for a repository via Bitbucket webhook in five steps:
-
Go to "Settings" section within the repository
-
Go to "Webhooks" section within the repository settings
-
Add webhook
-
Fill in webhook configuration
- Choose a title for this hook: for example "TYPO3 Docs".
- Fill URL field with
https://
.docs- hook. typo3. org - Enable "Active" Status.
- Select
Repository push
for "Triggers". - Click on "Save"
-
Webhook was added
Bitbucket should show a notice, which disappears after some seconds, that creation of webhook was successful. Also the webhook should be shown in the list.
-
Trigger webhook and visit to check request
Visit intercept.typo3.com and check "Recent actions" (scroll down).
For the documentation to be rendered, the hook needs to be triggered: Either push to the branch
main
. Or push to a new branchdocumentation-draft
.
GitLab cloud and GitLab self-hosted
Add auto rendering for a repository via GitLab webhook in four steps:
-
Go to "Integrations" section within the repository
-
Add webhook by filling in webhook configuration
- Fill URL field with
https://
.docs- hook. typo3. org - Select
Push events
andTag push events
for "Trigger". - Click on "Add webhook"
- Fill URL field with
-
Webhook was added
The webhook should be shown in the list (scroll down).
-
Trigger webhook and visit to check request
Visit intercept.typo3.com and check "Recent actions" (scroll down).
For the documentation to be rendered, the hook needs to be triggered: Either push to the branch
main
. Or push to a new branchdocumentation-draft
.