From 71a3ef221e68860e81c75329b84e0503060eacdb Mon Sep 17 00:00:00 2001 From: Sandra Erbel Date: Tue, 2 Apr 2024 15:17:10 +0200 Subject: [PATCH] Backport rendering 11 (#107) * [TASK] [Backport 11.5] Switch Documentation Rendering to PHP (#105) * [TASK] Switch Documentation Rendering to PHP You can try out the rendering locally with ``` make docs ``` * Update Documentation/CoreSupport/Tca/Index.rst * Update Documentation/LocalizedContent/Index.rst --------- Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com> (cherry picked from commit 3ec7aafe5f8d735333fb7e4a5854a6fafe9ac4a7) * Adjust guides.xml --- .editorconfig | 5 ++ .github/workflows/test-documentation.yml | 17 +++++++ .gitignore | 1 + Documentation/CoreSupport/Tca/Index.rst | 2 +- Documentation/LocalizedContent/Index.rst | 4 +- Documentation/Settings.cfg | 62 ------------------------ Documentation/guides.xml | 21 ++++++++ Makefile | 14 ++++++ 8 files changed, 61 insertions(+), 65 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 f36993d..e9e577c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -23,3 +23,8 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 max_line_length = 80 + +# 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..123ecc8 --- /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 --fail-on-log \ No newline at end of file diff --git a/.gitignore b/.gitignore index b9cd1fe..78fe678 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *GENERATED* +/.idea diff --git a/Documentation/CoreSupport/Tca/Index.rst b/Documentation/CoreSupport/Tca/Index.rst index d9f70d6..42c4d1e 100644 --- a/Documentation/CoreSupport/Tca/Index.rst +++ b/Documentation/CoreSupport/Tca/Index.rst @@ -185,7 +185,7 @@ DataHandler commands for localization Localizing a record can be done by the :ref:`"localize" command ` of the -:ref:`DataHandler `. This is the command that is sent +:ref:`DataHandler `. This is the command that is sent when you press the translate buttons in :guilabel:`Web > List` or :guilabel:`Web > Page` for an element. diff --git a/Documentation/LocalizedContent/Index.rst b/Documentation/LocalizedContent/Index.rst index 3af82fd..a5c2aec 100644 --- a/Documentation/LocalizedContent/Index.rst +++ b/Documentation/LocalizedContent/Index.rst @@ -134,7 +134,7 @@ about the records in the default language at all. .. tip:: For more information on how to add languages and configure their behaviour in the site configuration, see - :ref:`Adding Languages `. + :ref:`Adding Languages `. .. _localized-content-all-language: @@ -170,7 +170,7 @@ is valid for all languages. Localizing inline elements (IRRE) ================================= -When localizing a record with :ref:`inline elements (IRRE) `, +When localizing a record with :ref:`inline elements (IRRE) `, the inline elements will be grayed out and not automatically localized. TYPO3 will display two buttons to help you localize and keep the elements in sync. diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg deleted file mode 100644 index 0bcacd5..0000000 --- a/Documentation/Settings.cfg +++ /dev/null @@ -1,62 +0,0 @@ -# More information about this file: -# https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#settings-cfg - -[general] - -project = Frontend Localization Guide -version = 11.5 -release = 11.5 -copyright = since 2012 by the TYPO3 contributors - -[html_theme_options] - -# "Edit on GitHub" button -github_repository = TYPO3-Documentation/TYPO3CMS-Guide-FrontendLocalization -github_branch = 11.5 - -# Footer links -project_home = https://docs.typo3.org/m/typo3/guide-frontendlocalization/11.5/en-us/ -project_contact = https://typo3.slack.com/archives/C028JEPJL -project_repository = https://github.com/TYPO3-Documentation/TYPO3CMS-Guide-FrontendLocalization -project_issues = https://github.com/TYPO3-Documentation/TYPO3CMS-Guide-FrontendLocalization/issues -project_discussions = - -use_opensearch = - -[intersphinx_mapping] - -# Official TYPO3 manuals -h2document = https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/ -# t3cheatsheets = https://docs.typo3.org/m/typo3/docs-cheatsheets/main/en-us/ -# t3contribute = https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/ -t3coreapi = https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ -# t3docteam = https://docs.typo3.org/m/typo3/team-t3docteam/main/en-us/ -t3editors = https://docs.typo3.org/m/typo3/tutorial-editors/11.5/en-us/ -# t3extbasebook = https://docs.typo3.org/m/typo3/book-extbasefluid/main/en-us/ -# t3extexample = https://docs.typo3.org/m/typo3/guide-example-extension-manual/main/en-us/ -# t3home = https://docs.typo3.org/ -# t3install = https://docs.typo3.org/m/typo3/guide-installation/main/en-us/ -# t3l10n = https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/en-us/ -# t3sitepackage = https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/ -# t3start = https://docs.typo3.org/m/typo3/tutorial-getting-started/main/en-us/ -t3tca = https://docs.typo3.org/m/typo3/reference-tca/11.5/en-us/ -# t3templating = https://docs.typo3.org/m/typo3/tutorial-templating/main/en-us/ -# t3translate = https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/en-us/ -# t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/ -t3tsref = https://docs.typo3.org/m/typo3/reference-typoscript/11.5/en-us/ -# t3ts45 = https://docs.typo3.org/m/typo3/tutorial-typoscript-in-45-minutes/main/en-us/ -# t3viewhelper = https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/ -# t3upgrade = https://docs.typo3.org/m/typo3/guide-installation/main/en-us/ - -# TYPO3 system extensions -# ext_adminpanel = https://docs.typo3.org/c/typo3/cms-adminpanel/main/en-us/ -# ext_core = https://docs.typo3.org/c/typo3/cms-core/main/en-us/ -# ext_dashboard = https://docs.typo3.org/c/typo3/cms-dashboard/main/en-us/ -# ext_felogin = https://docs.typo3.org/c/typo3/cms-felogin/main/en-us/ -# ext_form = https://docs.typo3.org/c/typo3/cms-form/main/en-us/ -# ext_fsc = https://docs.typo3.org/c/typo3/cms-fluid-styled-content/main/en-us/ -# ext_indexed_search = https://docs.typo3.org/c/typo3/cms-indexed-search/main/en-us/ -# ext_rte_ckeditor = https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/ -# ext_scheduler = https://docs.typo3.org/c/typo3/cms-scheduler/main/en-us/ -# ext_seo = https://docs.typo3.org/c/typo3/cms-seo/main/en-us/ -# ext_workspaces = https://docs.typo3.org/c/typo3/cms-workspaces/main/en-us/ diff --git a/Documentation/guides.xml b/Documentation/guides.xml new file mode 100644 index 0000000..8ad079e --- /dev/null +++ b/Documentation/guides.xml @@ -0,0 +1,21 @@ + + + + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8d42d07 --- /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 --fail-on-log \ No newline at end of file