From 8fa5e58c50314fb7e9271aee3ead275c186cefcf Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Sun, 21 Jul 2024 13:01:43 +0200 Subject: [PATCH] [TASK] Update documenatation on include directive --- Documentation/Images/include-with-button.png | Bin 0 -> 11912 bytes .../Reference/Menus/IncludingFiles.rst | 136 +++++++++++++----- .../Reference/Menus/_Include/_Content.rst.txt | 14 ++ .../Menus/_Include/_ShowButtons.rst.txt | 8 ++ 4 files changed, 121 insertions(+), 37 deletions(-) create mode 100644 Documentation/Images/include-with-button.png create mode 100644 Documentation/WritingReST/Reference/Menus/_Include/_Content.rst.txt create mode 100644 Documentation/WritingReST/Reference/Menus/_Include/_ShowButtons.rst.txt diff --git a/Documentation/Images/include-with-button.png b/Documentation/Images/include-with-button.png new file mode 100644 index 0000000000000000000000000000000000000000..981d4bf38fc2f50e56999eff79e8e99618e54dde GIT binary patch literal 11912 zcmdUVcU+R+|ETS9HC&OYnVDIR(%dUGHFxfuWQykATco8{DsIW0xpRjdZiec?I!4BC9&%9b8A9rl6_xHQm8vvd zVzpq^HUZ_aE@OU%zIp~WoY#h1$B*WG2JJ?i%;|wyP^=gYFY)mjSqnXPc^J1p{d3w- zj%lnKmL~f7T(Rcsl(Q}#@sf*?Ze<9(jJTtJFFI?&JRPJ^n|*#Y`AgOIA{s{a#$=^} zbxc>5deWDG6DA_C5_7PRSW>s7_WeAzy7smfX{m>Q<6Jyf^TWbJ z-&FxEU5-m0U&^mUXI_aD8No~w+yyhz5(g84dZ%hP_dggOFs#=b1|&V_fXZ^E+!GJ@s1O&ONvI@I>nbx%+&<@Loh2VP;?<_oD-t&Etbh z!)=OeLu~i$<$E806mAnWL*+g8H*vW)n9dKEY6t0cKqmQvYNFjlS?v##c2XntIjB6t>rq7+-@0B;&yukiejI(XQ4SE35u)JPqc9fgl zvZBPW{FWuX*cv!P2(`D}7LwRb76gnB@~XnfecUY`j z5Ki3TH?P?aZ9Uk!d(Fs3yoV!N${{ZlSfh}lwV)lp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D|DBeU4-Ja zf7^=rxE~sw2}qzU%YiKQW;t`UgHI#vmn3;YX_R&uNLy>CD|vC`9RI&t{7(D$30l#W z5cDEu^<^-;_ygpGX3A|tMBmHfbdS{kR`Ttviyv+NDn;8E?k7nhMg=<`dgw)ze~5hK z4{1|U^ebl{xmXg&)np=c@<$4gGF+_>Du3=LZS7WvW?Ig}>vYOHM|{%Z;)*Zs>uJBS zC<9QE74czeUFfd7P>Rf#sW7VmksK%7de2&y(!alu{0VJRhkZ5qIY-M&WE#3joDX3c zgmEUwY~L*p^)ZYHo94Gx5?3hvh0yU;Qs$sztE? literal 0 HcmV?d00001 diff --git a/Documentation/WritingReST/Reference/Menus/IncludingFiles.rst b/Documentation/WritingReST/Reference/Menus/IncludingFiles.rst index 50562085..66945ab4 100644 --- a/Documentation/WritingReST/Reference/Menus/IncludingFiles.rst +++ b/Documentation/WritingReST/Reference/Menus/IncludingFiles.rst @@ -8,62 +8,124 @@ Including files =============== +Includes can be used for two use cases in the documentation: Repeating text +snippets used in several places or breaking up long pages into easier to edit +subparts. -*Recapitulation:* Each rst- or md-file will result in a url of its own. At parsing level -these files are processed independently. Toctree directives are controlling the -menu hierarchy of the contents. For each file intermediate results are stored -and each file will be processed during build. +Some documentation projects have the same snippet of text appear in several +places. This text can be maintained once and included in many places. -Some documentation projects have the same snippet of text appear in several places. -In this case it may make sense to *include* text snippets. The `.. include::` -directive does this. What you need to know about *including* files: +In this case it may make sense to *include* text snippets. The `.. include:: someFile.rst.txt` +directive does this. +Files to be included **cannot** lie outside the :path:`Documentation` folder. +They **may not** end on `.rst`. By convention they **should** end on `.rst.txt`. -.. _how-to-document-including-files-advantages: +.. contents:: + :caption: Table of contents -Advantages -========== -#. Includes are performed on a textual basis and therefore - processed in a very fast manner when the parent file is parsed. +.. _including-files-example-simple: -#. Includes do not lead to intermediate results that need to be resolved during build. +Example of a simple include: +============================ +Include the same text asking for contributions in all Events that do not +have an example yet: -.. _how-to-document-including-files-disadvantages: +.. code-block:: rst + :caption: Documentation/Events/Event1.rst -Disadvantages -============= -#. Since includes are treated as if the text had been written exactly - where the include is done the text needs to fit with respect to - the section levels. + Example + ======= -#. You cannot see the source of included text when clicking on "Show source of the page". + .. include:: /_includes/EventsContributeNote.rst.txt -#. The "Edit on GitHub" button cannot take you directly to the editing of included files. - It still can be done but needs much more knowledge about the GitHub interface. -#. When Sphinx reports warnings and errors the exact text location can be much harder to spot. +.. code-block:: rst + :caption: Documentation/Events/SomeOtherEvent.rst + Example + ======= -.. _how-to-document-including-files-recommendations: + .. include:: /_includes/EventsContributeNote.rst.txt -Recommendations -=============== +The file to be included: + +.. code-block:: rst + :caption: Documentation/_includes/EventsContributeNote.rst.txt + + .. note:: + Currently, we do not have an example for this event. If you can provide a + useful one, please open an issue ... + +These rst definitions will be included in all places the include is used as if +they had been written directly into the rst file. All markup is respected. + + +.. _including-files-example-advanced: + +Example: Break up a large file into manageable pieces +===================================================== + +In places like the TSconfig reference or TCA reference it is helpful to display +all properties of an element on one page. However this gives the contributors +very large rst files to maintain. Such files can be broken into pieces that +contain only the definition and maybe example of one parameter each. + +.. code-block:: rst + :caption: Documentation/ColumnsConfig/Type/Category/Index.rst + + Properties of the TCA column type `category` + ============================================ + + .. confval-menu:: + :display: table + :type: + :Scope: -.. attention:: + .. include:: _Properties/_Default.rst.txt + :show-buttons: - Includes can easily cause trouble. Think well before using them. + .. include:: _Properties/_ExclusiveKeys.rst.txt + :show-buttons: -.. important:: + .. include:: _Properties/_ForeignTable.rst.txt + :show-buttons: - Do not use the file endings :file:`.rst` or :file:`.md` for include files - to prevent Sphinx from treating them as individual source files! In case - you have many include files this would lead to many warnings and slow down - the build process considerably. Use :file:`*.rst.txt`. - The ending :file:`.rst.txt` can be used in PhpStorm and :file:`.editorconfig` - to define a reST file type. +Each include file in turn contains the complete data for one property, for +example: + +.. code-block:: rst + :caption: Documentation/ColumnsConfig/Type/Category/_Properties/_ExclusiveKeys.rst.txt + + .. _columns-category-properties-exclusivekeys: + + .. confval:: exclusiveKeys + :name: category-exclusiveKeys + :type: string (list of) + + List of keys that exclude any other keys ... + +The option `:show-buttons:` display a special "Edit on GitHub" button only for +the section contained within include: + +.. figure:: /Images/include-with-button.png + + The edit on GitHub button of an included section + + +.. _include-properties: + +Properties +========== -.. warning:: +.. confval-menu:: + :display: table + :type: + :Scope: - You cannot include files from outside the :file:`Documentation/` folder. + .. include:: _Include/_Content.rst.txt + :show-buttons: + .. include:: _Include/_ShowButtons.rst.txt + :show-buttons: diff --git a/Documentation/WritingReST/Reference/Menus/_Include/_Content.rst.txt b/Documentation/WritingReST/Reference/Menus/_Include/_Content.rst.txt new file mode 100644 index 00000000..fffab6ac --- /dev/null +++ b/Documentation/WritingReST/Reference/Menus/_Include/_Content.rst.txt @@ -0,0 +1,14 @@ +.. confval:: [content] + :name: directive-include-content + :type: string, local file path, relative or absolute + + Path to the file to be included. Can be relative or absolute. + + .. code-block:: rst + + .. include:: /some/absolute/path/_includes/_SomeFile.rst.txt + + .. include:: ../_includes/_SomeFile.rst.txt + + The path is calculated starting from the :path:`Documentation` directory. + It is not possible to include files from different locations in an extension. diff --git a/Documentation/WritingReST/Reference/Menus/_Include/_ShowButtons.rst.txt b/Documentation/WritingReST/Reference/Menus/_Include/_ShowButtons.rst.txt new file mode 100644 index 00000000..b033a607 --- /dev/null +++ b/Documentation/WritingReST/Reference/Menus/_Include/_ShowButtons.rst.txt @@ -0,0 +1,8 @@ +.. confval:: :show-buttons: + :name: directive-include-show-buttons + :type: string, local file path, relative or absolute + + If set an edit on GitHub Button is displayed if the + :ref:`edit-on-github workflow ` is enabled + in the :ref:`guides.xml `. In future other buttons might be + displayed if configured in the guides.xml.