Configuration of the rendering - guides.xml¶
This XML file contains meta information and configuration used during rendering of a manual.
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
links-are-relative="true"
default-code-language="php"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://extensions.typo3.org/extension/news/"
project-contact="https://typo3.slack.com/archives/C03TG7QJT"
project-repository="https://github.com/georgringer/news"
project-issues="https://github.com/georgringer/news/issues"
edit-on-github-branch="main"
edit-on-github="georgringer/news"
typo3-core-preferred="11.5"
interlink-shortcode="georgringer/news"
/>
<project title="News system" release="main (development)" version="main (development)"
copyright="since 2010 by Georg Ringer & Contributors"/>
<inventory id="t3extbasebook" url="https://docs.typo3.org/m/typo3/book-extbasefluid/10.4/en-us/"/>
</guides>
Hint
If you are migrating from the legacy Sphinx-based rendering and still have a Documentation/Settings.cfg you can use an automatic migration tool to migrate the Settings.cfg into a guides.xml
Table of Contents:
The <guides>
tag¶
The <guides>
tag is the root tag of the Documentation/guides.xml.
It is used for general configuration during parsing and rendering.
The following settings can be relevant for TYPO3 themed documentation:
default-code-language¶
-
default-code-language
¶ -
- Type
- string
Can be used to set the code-language that should be used for code-blocks if no language is set.
We advice to set the language to be used in each code-block however.
Example: Use typoscript
as default language for code-blocks¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
default-code-language="typoscript"
>
<!-- [...] -->
</guides>
Interlink mapping¶
The <inventory>
tag is located directly in the guides tag.
There can be 0 or more <inventory>
tags, each defines one Interlink
inventory.
A list of globally available Interlink (formerly "Intersphinx") repositories can be found in Available default inventories
It is possible, though rarely needed to define custom interlink mappings:
For example:
<inventory id="sphinx" url="https://www.sphinx-doc.org/en/master/"/>
The <project>
tag¶
The <project>
tag is located directly in the guides tag.
There can be 0 or 1 tag of that name.
This tag can contain the following meta information:
Project title¶
-
title
¶ -
- Type
- string
The project tag contains the title of the project and is displayed in the left sidebar (desktop) or the top (mobile) of the theme and in the title meta tag.
For TYPO3 extensions we suggest to use the extension name in a readable format:
- Import / Export tool
- News
- Mask
Common values are in the official TYPO3 manuals
<Topic> Guide
, e.g. "Frontend Localization Guide", for collections of articles on a specific topic<Topic> Reference
, e.g. "TSconfig Reference", for a complete reference<Topic> Tutorial
, e.g. "Editors Tutorial", for collections of tutorials on a specific topic
Example: Set the title of a project, including version, release and copyright¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<project title="News system" release="main (development)" version="main (development)"
copyright="since 2010 by Georg Ringer & Contributors"/>
</guides>
Version and release¶
-
version
¶ -
- Type
- string
When documentation is rendered in the GitHub action for deployment onto https://docs.typo3.org the version is set automatically to the extension's version derived from the Git tag. Setting the version in the guides.xml only affects local rendering.
The attributes version and release both contain the version of the manual and mostly correspond to the version of the TYPO3 LTS or TYPO3 extension to which the documentation refers.
The version is shown below the title in the theme's release switch and in the title meta tag, the release is not shown currently - but it should be kept anyway to satisfy internal requirements.
- version
- The major project version, used as the replacement for
|version|
. For example this may be something like 12.4. - release
- The full project version, used as the replacement for
|release|
For example 12.4.15-dev.
If you do not need the separation provided between version and release, just set them both to the same value.
Copyright¶
-
copyright
¶ -
- Type
- string
The copyright attribute contains the copyright claim of the project. It is displayed in the footer as "© Copyright <copyright>" and has in most use cases in the TYPO3 world the values:
since <creation-year> by the TYPO3 contributors
, for example "since 1999 by the TYPO3 contributors" (official TYPO3 manuals and TYPO3 system extensions)since <creation-year> by <vendor> & contributors
, for example "since 1999 by John Doe & contributors" (third-party TYPO3 extensions)
TYPO3 Theme settings¶
The <extension>
tag is located directly in the guides tag.
TYPO3 Theme specific settings can be made in the tag
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension">
.
There can be 0 or more tags of that name, however only one <extension>
tag
should be defined for the TYPO3 documentation theme.
The class attribute is mandatory, it references the extension that is used to render the documentation with the TYPO3 documentation theme.
TYPO3 Theme settings
edit-on-github-*¶
The github_repository and github_branch attributes should be set to provide the "Edit on GitHub" button, which allows the reader to jump from the currently viewed documentation directly to the associated GitHub repository and edit the page file.
If the project is hosted on GitHub and public contributions are welcome, these attributes should be set accordingly:
<user>/<repository>
, for example to "TYPO3-Documentation/TYPO3CMS-Reference-TCA" or "FriendsOfTYPO3/extension_builder".<branch>
, for example on "main" or "10.x".
For example:
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
edit-on-github-branch="main"
edit-on-github="TYPO3-Documentation/TYPO3CMS-Guide-HowToDocument"
/>
edit-on-github¶
-
edit-on-github
¶ -
- Type
- string
- Sytanx
- [GitHub Organiziation or user]/[Repository]
- Default
""
If this configuration is set, a button "Edit on GitHub" is displayed on each page of the manual.
Example: Display a button to edit in the repository of news¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
edit-on-github-branch="main"
edit-on-github="georgringer/news"
/>
</guides>
edit-on-github-branch¶
-
edit-on-github-branch
¶ -
- Type
- string
- Default
main
The branch that should be used for the "Edit on GitHub" button.
Example: Display a button to edit in the repository of tt_news on branch master¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
edit-on-github-branch="master"
edit-on-github="FriendsOfTYPO3/tt_address"
/>
</guides>
edit-on-github-directory¶
-
edit-on-github-directory
¶ -
- Type
- string
- Default
Documentation
The directory in which the documentation can be found. The GitHub render action currently does not support using other directories then Documentation/.
This setting is used exclusively for system extension manuals as the TYPO3 Core is kept in a mono repository on GitHub.
Example: Set the GitHub directory for a system extension¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
edit-on-github-branch="main"
edit-on-github="typo3/typo3"
edit-on-github-directory="typo3/sysext/adminpanel/Documentation/"
/>
</guides>
interlink-shortcode¶
-
interlink-shortcode
¶ -
- Type
- string
- Default
somemanual
The interlink shortcode will be displayed in the "Reference this headline" dialog when users click on the link symbol beside a headline or other linkable element.
These references can be used to link to your manual from other documents rendered with the TYPO3 theme. However they will only work if you follow these rules:
- TYPO3 third-party extensions: Composer name, example:
georgringer/news
- System extensions: Composer name, example:
typo3/cms-adminpanel
- A shortcode supported by the theme: Available default inventories
project_*¶
The project_<topic> attributes provide all links with the name "<Topic>" in the footer of the documentation that guide the user to other aspects of the project than the documentation, for example to the project page in the TYPO3 Extension Repository (TER):
project_home¶
-
project_home
¶ -
- Type
- string
is set to the homepage URL of the project. For official TYPO3 manuals this is the public base URL at docs.typo3.org, for public TYPO3 extensions this is the associated TER page or a custom project website, for example
https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/
orhttps://extensions.typo3.org/extension/news
.
project_contact¶
-
project_contact
¶ -
- Type
- string
is usually set to an email address or Slack channel URL of the team behind the project, for example
mailto:documentation\@typo3.org
orhttps://typo3.slack.com/archives/C028JEPJL
.
project_repository¶
-
project_repository
¶ -
- Type
- string
is set to the repository of the project's VCS, for example
https://github.com/FriendsOfTYPO3/extension_builder
.
project_issues¶
-
project_issues
¶ -
- Type
- string
is set to the location where project issues are to be created and edited, for example
https://github.com/FriendsOfTYPO3/extension_builder/issues
project_discussions¶
-
project_discussions
¶ -
- Type
- string
is used in the rare case that project-related discussions take place in locations other than those defined by the project_contact and project_issues attributes, for example
https://github.com/FriendsOfTYPO3/extension_builder/discussions
.
Example: Project links for a third-party extension¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://extensions.typo3.org/extension/news/"
project-contact="https://typo3.slack.com/archives/C03TG7QJT"
project-repository="https://github.com/georgringer/news"
project-issues="https://github.com/georgringer/news/issues"
/>
</guides>
Example: Project links for a system extension¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://extensions.typo3.org/extension/adminpanel/"
project-contact="https://typo3.slack.com/archives/C025BQLFA"
project-repository="https://github.com/typo3/typo3"
project-issues="https://forge.typo3.org/projects/typo3cms-core/issues"
/>
</guides>
Example: Project links for a reference or guide¶
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/"
project-contact="https://typo3.slack.com/archives/C028JEPJL"
project-repository="https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TSconfig"
project-issues="https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TSconfig/issues"
/>
</guides>
typo3-core-preferred¶
-
typo3-core-preferred
¶ -
- Type
- string
- Default
stable
You can set the preferred TYPO3 Core version. This version is used to determine the desired version for links to other manuals and system extensions.
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension" typo3-core-preferred="stable" />
Copied!If no preferred version is set it defaults to
stable
. Possible values are:main
,stable
(latest LTS),oldstable
(old LTS) or an explicit LTS / eLTS version like12.4
or8.7
.
Example: Set the preferred TYPO3 Core version to 11.5¶
At the time of writing the extension news is compatible with TYPO3 v11.5 and v12.4. When referencing Core manuals or extensions, we want the links to go automatically to version 11.5 of that reference or core extension. Therefore we set the preferred TYPO3 Core version to that value:
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
typo3-core-preferred="11.5"
</guides>
Example: Always link to the latest stable TYPO3 version¶
If you want your links to always go to the latest stable long time support version (LTS) of the TYPO3 Core, you can set typo3-core-preferred to stable.
At the time of writing references to official manuals and Core extensions will be rendered to version 12.4. Once TYPO3 13 LTS is released they will automatically switch to the according version on next re-rendering.
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
>
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
typo3-core-preferred="stable"
</guides>