Skip to content

Commit 2b91afa

Browse files
committed
[TASK] Fix #591: Replace Settings.cfg with guides.xml in generated documentation
Replace the Sphinx-based documentation template (Settings.cfg) with the PHP-renderer-based guides.xml format. Rename Includes.txt to Includes.rst.txt and update all include paths to use absolute references (/Includes.rst.txt). Update FileGenerator to render guides.xmlt instead of Settings.cfgt.
1 parent 6f6d5bc commit 2b91afa

25 files changed

Lines changed: 89 additions & 413 deletions

File tree

Classes/Service/FileGenerator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,15 +846,15 @@ protected function generateDocumentationFiles(): void
846846
'',
847847
true,
848848
5,
849-
'.*(rstt|ymlt)'
849+
'.*(rstt|ymlt|xmlt)'
850850
);
851851
foreach ($docFiles as $docFile) {
852852
if (is_dir($docFile)) {
853853
$this->mkdir_deep(
854854
$this->extensionDirectory,
855855
'Documentation/' . str_replace($this->getTemplatePath('Documentation/'), '', $docFile)
856856
);
857-
} elseif (!str_contains($docFile, '.rstt') && !str_contains($docFile, '.ymlt')) {
857+
} elseif (!str_contains($docFile, '.rstt') && !str_contains($docFile, '.ymlt') && !str_contains($docFile, '.xmlt')) {
858858
$this->upload_copy_move(
859859
$docFile,
860860
str_replace(
@@ -867,8 +867,8 @@ protected function generateDocumentationFiles(): void
867867
}
868868
$fileContents = $this->renderTemplate('Documentation/Index.rstt', ['extension' => $this->extension]);
869869
$this->writeFile($this->extensionDirectory . 'Documentation/Index.rst', $fileContents);
870-
$fileContents = $this->renderTemplate('Documentation/Settings.cfgt', ['extension' => $this->extension]);
871-
$this->writeFile($this->extensionDirectory . 'Documentation/Settings.cfg', $fileContents);
870+
$fileContents = $this->renderTemplate('Documentation/guides.xmlt', ['extension' => $this->extension]);
871+
$this->writeFile($this->extensionDirectory . 'Documentation/guides.xml', $fileContents);
872872
}
873873

874874
protected function generateEmptyGitRepository(): void

Resources/Private/CodeTemplates/Extbase/Documentation/ChangeLog/Index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../Includes.txt
1+
.. include:: /Includes.rst.txt
22

33
.. _changelog:
44

Resources/Private/CodeTemplates/Extbase/Documentation/Configuration/Index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../Includes.txt
1+
.. include:: /Includes.rst.txt
22

33
.. _configuration:
44

@@ -47,4 +47,4 @@ don't hesitate to cross-link to the TypoScript Reference as shown below.
4747

4848
See :ref:`h2document:how-to-document-hyperlinks` for information about how to use cross-references.
4949

50-
See the :file:`Settings.cfg` file for the declaration of cross-linking keys.
50+
See the :file:`guides.xml` file for the declaration of cross-referencing inventories.

Resources/Private/CodeTemplates/Extbase/Documentation/Developer/Index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../Includes.txt
1+
.. include:: /Includes.rst.txt
22

33
.. _developer:
44

Resources/Private/CodeTemplates/Extbase/Documentation/Editor/Index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../Includes.txt
1+
.. include:: /Includes.rst.txt
22

33
.. _for-editors:
44

Resources/Private/CodeTemplates/Extbase/Documentation/Includes.txt renamed to Resources/Private/CodeTemplates/Extbase/Documentation/Includes.rst.txt

File renamed without changes.
Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
.. every .rst file should include Includes.txt
2-
.. use correct path!
3-
4-
.. include:: Includes.txt
5-
6-
.. Every manual should have a start label for cross-referencing to
7-
.. start page. Do not remove this!
1+
.. include:: /Includes.rst.txt
82

93
.. _start:
104

@@ -31,29 +25,6 @@
3125

3226
{extension.description}
3327

34-
**TYPO3**
35-
36-
The content of this document is related to TYPO3 CMS,
37-
a GNU/GPL CMS/Framework available from `typo3.org <https://typo3.org/>`_ .
38-
39-
**Community Documentation**
40-
41-
This documentation is community documentation for the TYPO3 extension {extension.name}
42-
43-
It is maintained as part of this third party extension.
44-
45-
If you find an error or something is missing, please:
46-
`Report a Problem <https://github.com/TYPO3-Documentation/TYPO3CMS-Example-ExtensionManual/issues/new>`__
47-
48-
**Extension Manual**
49-
50-
This documentation is for the TYPO3 extension {extension.extensionKey}.
51-
52-
**For Contributors**
53-
54-
You are welcome to help improve this guide.
55-
Just click on "Edit me on GitHub" on the top right to submit your change request.
56-
5728
.. toctree::
5829
:maxdepth: 3
5930

@@ -64,4 +35,3 @@ Just click on "Edit me on GitHub" on the top right to submit your change request
6435
Developer/Index
6536
KnownProblems/Index
6637
ChangeLog/Index
67-
Sitemap

Resources/Private/CodeTemplates/Extbase/Documentation/Installation/Index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../Includes.txt
1+
.. include:: /Includes.rst.txt
22

33
.. _installation:
44

Resources/Private/CodeTemplates/Extbase/Documentation/Introduction/Index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../Includes.txt
1+
.. include:: /Includes.rst.txt
22

33
.. _introduction:
44

@@ -33,8 +33,8 @@ install and use this extension.
3333

3434
.. important::
3535

36-
Don't forget to set extension's version number in :file:`Settings.cfg` file,
37-
in the :code:`release` property.
36+
Don't forget to set the extension's version number in :file:`guides.xml`,
37+
in the :code:`release` attribute of the :code:`<project>` element.
3838
It will be automatically picked up on the cover page by the :code:`|release|` substitution.
3939

4040
.. _screenshots:

Resources/Private/CodeTemplates/Extbase/Documentation/KnownProblems/Index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. include:: ../Includes.txt
1+
.. include:: /Includes.rst.txt
22

33
.. _known-problems:
44

0 commit comments

Comments
 (0)