Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Remove Tools to Edit Rest page #350

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/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
8 changes: 1 addition & 7 deletions Documentation/BasicPrinciples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,7 @@ Examples for system extensions are:
* `ext:rte_ckeditor <https://docs.typo3.org/typo3cms/extensions/rte_ckeditor/>`__

Note, that if your system has been installed with Composer, not all system extensions may exist
in the system, if each system extension has been required separately as "subtree splitted packages"
(not as `typo3/cms`). Since TYPO3 9, installation of "subtree splitted packages" is mandatory.

For more information on subtree split, see

* `Usetypo3: The TYPO3 Subtree Split and Composer <https://usetypo3.com/typo3-subtree-split-and-composer.html>`__
* :ref:`Installation and Upgrade guide: Composer migration <composer-migration-require-subtree-packages>`
in the system.


.. index:: pair: System extensions; Documentation
Expand Down
37 changes: 0 additions & 37 deletions Documentation/GeneralConventions/Glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,40 +202,3 @@ third party extension

ViewHelper
Our community agreed on this spelling.



Glossary
========

.. https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#glossary
.. Creating a glossary with terms that you can refer to - obtaining a link.

What terms mean:

.. glossary::

third party extension
Any extension that is not part of the :term:`TYPO3 Core`.

TYPO3 CMS
The TYPO3 content management system.

TYPO3 Core
...

TYPO3 Core Team
This is the team that drives the development of the :term:`TYPO3 Core`.


.. See `Issue on GitHub
<https://github.com/TYPO3-Documentation/TYPO3CMS-Guide-HowToDocument/issues/36>`__
for discussion about spelling.

.. See open issue about `Clarifying terms
<https://github.com/TYPO3-Documentation/T3DocTeam/issues/77>`__

.. Open related issue `Several changes for making TYPO3 concepts easier
to understand for new users
<https://github.com/TYPO3-Documentation/T3DocTeam/issues/120>`__

1 change: 0 additions & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ What's new in this guide?
WritingContent/Index
WritingDocForExtension/Index
WritingDocsOfficial/Index
ToolsEditRest/Index
RenderingDocs/Index
GitHub/Index

Expand Down
135 changes: 77 additions & 58 deletions Documentation/RenderingDocs/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,97 +10,116 @@
.. _render-documenation-with-docker:
.. _render-documentation-with-docker:

=========================================
Render documentation with the TYPO3 theme
=========================================

===========================
How to render documentation
===========================
.. contents::

This page explains how to render a manual locally on your machine
with Docker in order to test the rendering.
Rendering the :file:`Documentation` folder locally with Docker
==============================================================

Run these commands in a terminal in the parent directory of the directory
:file:`Documentation`. You should use a bash compatible shell, if possible.
You can render the documentation of an official TYPO3 manual or a third-party
manual with the following steps:

If you run into a problem while rendering, check :ref:`rendering-docs-troubleshooting`,
`report an issue <https://github.com/t3docs/docker-render-documentation/issues/new>`__
or :ref:`ask for help <get-help-on-writing-docs>`.
#. Clone the repository containing the documentation.

#. Navigate to the extension's root folder, the directory which contains the
:file:`composer.json`.

.. rst-class:: bignums-xxl
#. Check if there is documentation to be rendered:

#. Install Docker: https://docs.docker.com/install/
A folder called :file:`Documentation` containing at least the files
:file:`Index.rst` and :file:`guides.xml`.

#. Preparations
#. Choose your prefered method of rendering (See below):

The docker image is not listed on Docker Hub (hub.docker.com) anymore, therefore some preparations
need to be done once:
Make sure that `Docker <https://www.docker.com/>`__ is installed on your system.

.. code-block:: bash
.. tabs::

# pull 'latest' version from GitHub container repository
docker pull ghcr.io/t3docs/render-documentation
.. group-tab:: Linux

# The "real" tag is independent of the container repository,
# so let's just create that extra "real" and "generic" tag
docker tag ghcr.io/t3docs/render-documentation t3docs/render-documentation
.. code-block:: bash

# verify it worked
docker run --rm t3docs/render-documentation --version
mkdir -p Documentation-GENERATED-temp
docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation
xdg-open "Documentation-GENERATED-temp/Index.html"

#. Make 'dockrun_t3rd' available in current terminal
.. group-tab:: MacOS

.. code-block:: bash
.. code-block:: bash

eval "$(docker run --rm t3docs/render-documentation show-shell-commands)"
mkdir -p Documentation-GENERATED-temp
docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation
open "Documentation-GENERATED-temp/Index.html"

This will run the Docker container and print out shell code. Once "eval-uated"
the code defines a helper function named `dockrun_t3rd`. This function relieves
you of the work of setting the volumes and rights correctly when running the
container and ensures a folder for the rendering results is provided. Executing
the code with `eval` defines the function for your current terminal. Don't forget
the quotes around everything that goes into eval. Either define the function each
time you open a new terminal window or add the line to the startup file of your
shell like `~/.bashrc` or `.zshrc`.
.. group-tab:: Windows

#. Run dockrun_t3rd
.. code-block:: powershell

.. code-block:: bash
New-Item -ItemType Directory -Force -Path ".\Documentation-GENERATED-temp"
docker run --rm --pull always -v ${PWD}:/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation
start "Documentation-GENERATED-temp/Index.html"

dockrun_t3rd makehtml
Publishing extension documentation to docs.typo3.org
====================================================

This will automatically find the documentation in the
:file:`Documentation` subfolder. It will create a directory
:file:`Documentation-GENERATED-temp` and write the results there.
For your documentation to be published to https://docs.typo3.org, your
TYPO3 extension has to have a valid :file:`composer.json` and either a folder
called :file:`Documentation` with a :file:`Documentation/Index.rst` and
a :file:`Documentation/guides.xml` or a :file:`README.rst` / :file:`README.md`
in the extensions root directory.

#. Open generated documentation
The extension has to be publicly available on GitHub or GitLab. You have to
establish a :ref:`Webhook <webhook>` and the Documentation Team has to
:ref:`approve <approval-intercept>` your first rendering.

Look at the output of the previous command to see where the
generated documentation is located or use one of these commands
to directly open the start page in a browser:
Introduce automatic testing for extension documentation
=======================================================

.. tabs::
It is recommended to make sure your documentation always renders without
warning. On GitHub or GitLab you can introduce actions that test your
documentation automatically:

.. group-tab:: Linux
.. tabs::

.. code-block:: bash
.. group-tab:: GitHub

xdg-open "Documentation-GENERATED-temp/Result/project/0.0.0/Index.html"
.. code-block:: yaml
:caption: .github/workflows/documentation.yml

.. group-tab:: MacOS
name: test documentation

.. code-block:: bash
on: [ push, pull_request ]

open "Documentation-GENERATED-temp/Result/project/0.0.0/Index.html"
jobs:
tests:
name: documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

.. group-tab:: Windows
- 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

.. code-block:: powershell
.. group-tab:: GitLab

start "Documentation-GENERATED-temp/Result/project/0.0.0/Index.html"
.. code-block:: bash
:caption: .gitlab-ci.yml

stages:
- test

.. toctree::
:hidden:
:glob:
test_documentation:
stage: test
script:
- 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
tags:
- docker

Troubleshooting
Loading