From c7fb3dc4c670828c56184de90fffdf134f6757da Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Sun, 10 Mar 2024 11:13:56 +0100 Subject: [PATCH] [TASK] Backport 12 Switch to PHP-based rendering (#80) --- .github/workflows/documentation.yml | 17 ++++++++++++++ Documentation/Includes.rst.txt | 35 +---------------------------- Documentation/Index.rst | 1 - Documentation/genindex.rst | 7 ------ Documentation/guides.xml | 18 +++++++++++++++ Makefile | 16 +++++++++++++ 6 files changed, 52 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/documentation.yml delete mode 100644 Documentation/genindex.rst create mode 100644 Documentation/guides.xml create mode 100644 Makefile diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..79ac662 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -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 diff --git a/Documentation/Includes.rst.txt b/Documentation/Includes.rst.txt index d1bbcda..2362507 100644 --- a/Documentation/Includes.rst.txt +++ b/Documentation/Includes.rst.txt @@ -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 \ No newline at end of file +.. You can put central messages to display on all pages here diff --git a/Documentation/Index.rst b/Documentation/Index.rst index 23c8160..714e198 100644 --- a/Documentation/Index.rst +++ b/Documentation/Index.rst @@ -56,4 +56,3 @@ from the PHP source code of TYPO3 CMS and the package names do not correspond Contribution/Index Sitemap - genindex diff --git a/Documentation/genindex.rst b/Documentation/genindex.rst deleted file mode 100644 index 806ec56..0000000 --- a/Documentation/genindex.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. include:: /Includes.rst.txt - -===== -Index -===== - -.. Sphinx will insert here the general index automatically. diff --git a/Documentation/guides.xml b/Documentation/guides.xml new file mode 100644 index 0000000..41f8917 --- /dev/null +++ b/Documentation/guides.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..77dab54 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +.PHONY: help +help: ## Displays this list of targets with descriptions + @echo "The following commands are available:\n" + @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' + +.PHONY: docs +docs: ## Generate projects documentation (from "Documentation" directory) + mkdir -p Documentation-GENERATED-temp + + docker run --rm --pull always -v "$(shell pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation + +.PHONY: test-docs +test-docs: ## Test the documentation rendering + mkdir -p Documentation-GENERATED-temp + + docker run --rm --pull always -v "$(shell pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log