From a3a7758afdb2cf0e3a00b5070b720dac894afda3 Mon Sep 17 00:00:00 2001 From: Sandra Erbel Date: Tue, 15 Oct 2024 16:26:48 +0200 Subject: [PATCH] [TASK] Switch to PHP-based Documentation Rendering Resolves: #39 Releases: 4.0.0 --- .editorconfig | 5 +++++ .github/workflows/test-documentation.yml | 17 +++++++++++++++++ .gitignore | 2 ++ Documentation/Includes.txt | 14 +------------- Documentation/Index.rst | 3 --- Documentation/Settings.cfg | 15 --------------- Documentation/guides.xml | 20 ++++++++++++++++++++ Makefile | 14 ++++++++++++++ 8 files changed, 59 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/test-documentation.yml delete mode 100644 Documentation/Settings.cfg create mode 100644 Documentation/guides.xml create mode 100644 Makefile diff --git a/.editorconfig b/.editorconfig index 5193999..e3f1180 100644 --- a/.editorconfig +++ b/.editorconfig @@ -69,3 +69,8 @@ indent_size = 4 [*.neon] indent_style = tab + +# Makefile +[{Makefile,**.mk}] +# Use tabs for indentation (Makefiles require tabs) +indent_style = tab \ No newline at end of file diff --git a/.github/workflows/test-documentation.yml b/.github/workflows/test-documentation.yml new file mode 100644 index 0000000..10cc6d5 --- /dev/null +++ b/.github/workflows/test-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 --minimal-test diff --git a/.gitignore b/.gitignore index cdc6aa9..3ab9871 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ config/ var/ *.cache composer.lock +.idea/ +Documentation-GENERATED-temp/ diff --git a/Documentation/Includes.txt b/Documentation/Includes.txt index 474ba36..b082bae 100644 --- a/Documentation/Includes.txt +++ b/Documentation/Includes.txt @@ -1,13 +1 @@ -.. This is 'Includes.txt'. It is included at the very top of each and -.. every ReST source file in this documentation project (= manual). - -.. role:: typoscript(code) - -.. role:: ts(typoscript) - :class: typoscript - -.. role:: php(code) - -.. highlight:: php - -.. default-role:: code +.. You can put central messages to display on all pages here diff --git a/Documentation/Index.rst b/Documentation/Index.rst index aaa7daf..f4b194d 100644 --- a/Documentation/Index.rst +++ b/Documentation/Index.rst @@ -51,6 +51,3 @@ a GNU/GPL CMS/Framework available from http://typo3.org Introduction/Index Installation/Index - Configuration/Index - Breaking/Index - Testing/Index diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg deleted file mode 100644 index 57949ca..0000000 --- a/Documentation/Settings.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[general] -project = sessionplaner -release = 4.0.0 -copyright = since 2013 by evoWeb - -[html_theme_options] - -github_branch = master -github_repository = evoweb/sessionplaner - -project_contact = -project_discussions = -project_home = https://github.com/evoWeb/sessionplaner -project_issues = https://github.com/evoWeb/sessionplaner/issues -project_repository = https://github.com/evoWeb/sessionplaner diff --git a/Documentation/guides.xml b/Documentation/guides.xml new file mode 100644 index 0000000..e3b160c --- /dev/null +++ b/Documentation/guides.xml @@ -0,0 +1,20 @@ + + + + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9fc440f --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +.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 --minimal-test