Skip to content

Commit

Permalink
[DOCS] Backport 11.5, Switch to PHP based documentation rendering (#970)
Browse files Browse the repository at this point in the history
* [DOCS] Backport 11.5, Switch to PHP based documentation rendering (#968)

* Create guides.xml
* Remove now outdated Settings.cfg
* Remove outdated genindex.rst
* Remove outdated screenshots.json
* Introduce automatic testing for documentation changes
* Introduce make file for easy local rendering

(cherry picked from commit 556af29)

* [BUGFIX] Fix rendering warnings
  • Loading branch information
linawolf authored Mar 10, 2024
1 parent 084b47f commit 6e43118
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 2,488 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/test-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: test documentation

on: [ push, pull_request ]

jobs:
tests:
name: documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Test if the documentation will render without warnings
run: |
mkdir -p Documentation-GENERATED-temp \
&& docker run --rm --pull always -v $(pwd):/project \
ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log
2 changes: 1 addition & 1 deletion Documentation/BestPractises/LanguageFields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Language fields
================

See also the :ref:`Frontend Localization Guide <t3l10n:core-support-tca>`.
See also the :ref:`Frontend Localization Guide <t3translate:core-support-tca>`.

.. note::
It is possible to change the names of the following fields, however this is
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ColumnsConfig/CommonProperties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Related configurations
{#uid_local} = ###THIS_UID###

The above example uses the special field quoting syntax :php:`{#...}` around identifiers of the
:ref:`QueryHelper <t3coreapi:database-query-helper-quoteDatabaseIdentifiers>` to be as DBAL compatible
QueryHelper to be as DBAL compatible
as possible.

.. _tca_property_MM_auto_creation_mm_table:
Expand Down
1 change: 0 additions & 1 deletion Documentation/ColumnsConfig/CommonProperties/ReadOnly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ readOnly
:Types:
:ref:`category <columns-category>`,
:ref:`check <columns-check>`,
:ref:`email <columns-email>`,
:ref:`group <columns-group>`,
:ref:`imageManipulation <columns-imageManipulation>`,
:ref:`inline <columns-inline>`,
Expand Down
3 changes: 1 addition & 2 deletions Documentation/ColumnsConfig/CommonProperties/Search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,4 @@ search
of type Text and Text & Images. This helps making any search more relevant.

The above example uses the special field quoting syntax :php:`{#...}` around identifiers of the
:ref:`QueryHelper <t3coreapi:database-query-helper-quoteDatabaseIdentifiers>` to be as DBAL compatible
as possible.
QueryHelper to be as DBAL compatible as possible.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ treeConfig
Deprecated, use startingPoints (see below);
uid of the record that shall be considered as the root node of the tree.
In general this might be set by Page TSconfig, see
:ref:`pagetsconfigtceformconfigtreeconfig`
:ref:`t3tsconfig:pagetsconfigtceformconfigtreeconfig`

startingPoints (string, comma separated values)
allows to set multiple records as roots for tree records.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ColumnsConfig/Type/Flex/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FlexForm field
==============

Renders a :ref:`FlexForm <flexforms>` element. Essentially, this consists in a
Renders a :ref:`FlexForm <t3coreapi:flexforms>` element. Essentially, this consists in a
hierarchically organized set of fields which will have their values saved into a
single field in the database, stored as XML.

Expand Down
5 changes: 0 additions & 5 deletions Documentation/ColumnsConfig/Type/Group/Properties/Filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ filter
contains the array of values which should be filtered by the userFunc. The function must return the filtered
array of values.

.. note::

Do not confuse the filter values with the page tree selector on the left side. To change the entry page in the navigation
use :ref:`elementBrowserEntryPoints <columns-group-properties-elementBrowserEntryPoints>` instead.

Multiple filters can be defined, and an array of configuration data for each of the filters can be supplied:

.. code-block:: php
Expand Down
10 changes: 5 additions & 5 deletions Documentation/ColumnsConfig/Type/Inline/Examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,20 @@ type inline** - as it is a container.
{
public function render()
{
$fieldName = $this->data['fieldName'];
$fieldName = $this->data['fieldName'];
$result = $this->initializeResultArray();
// Add fieldInformation only for this field name
// this may be changed accordingly
// this may be changed accordingly
if ($fieldName !== 'my_new_field') {
return $result;
}
$text = $GLOBALS['LANG']->sL(
'LLL:EXT:my_example/Resources/Private/Language/'
. 'locallang_db.xlf:tt_content.fieldInformation.demo'
);
$result['html'] = $text;
return $result;
}
Expand Down Expand Up @@ -230,6 +230,6 @@ type inline** - as it is a container.

* :ref:`['ctrl']['container'] <ctrl-reference-container>`
* How to create custom fieldInformation, fieldControl or fieldWizard in
:ref:`FormEngine <FormEngine-Rendering-NodeExpansion>` chapter (TYPO3
:ref:`FormEngine <t3coreapi:FormEngine-Rendering-NodeExpansion>` chapter (TYPO3
Explained)
* :ref:`fieldInformation <tca_property_fieldInformation>` property
29 changes: 5 additions & 24 deletions Documentation/ColumnsConfig/Type/Inline/Properties/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,11 @@ Properties
Special properties
==================

.. toctree::
:titlesonly:

Appearance
BehaviourDisableMovingChildrenWithParent
BehaviourEnableCascadingDelete
CustomControls
Filter
ForeignDefaultSortby
ForeignField
ForeignLabel
ForeignMatchFields
ForeignSelector
ForeignSortby
ForeignTable
ForeignTableField
ForeignUnique
Mm
OverrideChildTCa
ShowNewRecordLink
Size
SymmetricField
SymmetricLabel
SymmetricSortby
.. toctree::
:titlesonly:
:glob:

*


Common properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,3 @@ symmetric\_field
This works like :ref:`foreign_field <columns-inline-properties-foreign-field>`, but in case of using
bidirectional symmetric relations. :code:`symmetric_field` defines in which field on
the :ref:`foreign_table <columns-inline-properties-foreign-table>` the uid of the "other" parent is stored.

Example
=======

.. include:: /CodeSnippets/InlineMnSymmetricInline1.rst.txt

.. include:: /CodeSnippets/InlineMnSymmetricBranches.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Field quoting

The example below uses the special field quoting syntax :php:`{#...}`
around identifiers of the
:ref:`QueryHelper <t3coreapi:database-query-helper-quoteDatabaseIdentifiers>`
QueryHelper
to be as DBAL compatible as possible. Note that :php:`ORDER BY` and :php:`GROUP BY`
should NOT be quoted, since they always receive proper quoting automatically
through the API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ treeConfig

Additionally, each value used in `startingPoints` may be fed from a site
configuration by using the `###SITE:###` syntax.
This property can also be set by page TSconfig, see
:ref:`pagetsconfigtceformconfigtreeconfig`

This property can also be set by page TSconfig, see
:ref:`t3tsconfig:pagetsconfigtceformconfigtreeconfig`

Example:

Expand Down
15 changes: 3 additions & 12 deletions Documentation/ColumnsConfig/Type/Text/Properties/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@
Properties
==========

.. toctree::
.. toctree::
:glob:

Cols
EnableRichtext
EnableTabulator
Eval
FixedFont
Format.rst
IsIn
Max
RichtextConfiguration
Rows
Wrap
*
2 changes: 1 addition & 1 deletion Documentation/Ctrl/Properties/LanguageField.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ languageField
these languages and if this option is set, edit access for languages
will be enforced for this table.

Also see the :ref:`Frontend Localization Guide <t3l10n:core-support-tca>`
Also see the :ref:`Frontend Localization Guide <t3translate:core-support-tca>`
for a discussion about the effects of
this property (and other TCA properties) on the localization process.

Expand Down
35 changes: 1 addition & 34 deletions Documentation/Includes.rst.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1 @@
.. More information about this file:
https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#includes-rst-txt
.. ----------
.. text roles
.. ----------
.. role:: aspect(emphasis)
.. role:: bash(code)
.. role:: html(code)
.. role:: js(code)
.. role:: php(code)
.. role:: rst(code)
.. role:: sep(strong)
.. role:: sql(code)

.. role:: tsconfig(code)
:class: typoscript

.. role:: typoscript(code)
.. role:: xml(code)
:class: html

.. role:: yaml(code)

.. default-role:: code

.. ---------
.. highlight
.. ---------
.. By default, code blocks use PHP syntax highlighting
.. highlight:: php
.. You can put central messages to display on all pages here
1 change: 0 additions & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ This document is the complete reference of the *Table Configuration Array*
:hidden:

Sitemap
genindex
62 changes: 0 additions & 62 deletions Documentation/Settings.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions Documentation/genindex.rst

This file was deleted.

23 changes: 23 additions & 0 deletions Documentation/guides.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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">
<extension
class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://docs.typo3.org/m/typo3/reference-tca/main/en-us/"
project-contact="https://typo3.slack.com/archives/C028JEPJL"
project-repository="https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA"
project-issues="https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TCA/issues"
edit-on-github-branch="11.5"
edit-on-github="TYPO3-Documentation/TYPO3CMS-Reference-TCA"
typo3-core-preferred="11.5"
interlink-shortcode="t3tca"
/>
<project title="TCA Reference"
release="11.5"
version="11.5"
copyright="since 2012 by the TYPO3 contributors"
/>
<inventory id="t3extbasebook" url="https://docs.typo3.org/m/typo3/book-extbasefluid/10.4/en-us/"/>
</guides>
Loading

0 comments on commit 6e43118

Please sign in to comment.