Skip to content

Commit

Permalink
Backport rendering 11 (#107)
Browse files Browse the repository at this point in the history
* [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 3ec7aaf)

* Adjust guides.xml
  • Loading branch information
Alagts authored Apr 2, 2024
1 parent e07c111 commit 71a3ef2
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 65 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions .github/workflows/test-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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*GENERATED*
/.idea
2 changes: 1 addition & 1 deletion Documentation/CoreSupport/Tca/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ DataHandler commands for localization

Localizing a record can be done by the
:ref:`"localize" command <t3coreapi:tce-command-keywords>` of the
:ref:`DataHandler <datahandler-basics>`. This is the command that is sent
:ref:`DataHandler <t3coreapi:datahandler-basics>`. This is the command that is sent
when you press the translate buttons in :guilabel:`Web > List` or
:guilabel:`Web > Page` for an element.

Expand Down
4 changes: 2 additions & 2 deletions Documentation/LocalizedContent/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sitehandling-addinglanguages>`.
:ref:`Adding Languages <t3coreapi:sitehandling-addingLanguages>`.


.. _localized-content-all-language:
Expand Down Expand Up @@ -170,7 +170,7 @@ is valid for all languages.
Localizing inline elements (IRRE)
=================================

When localizing a record with :ref:`inline elements (IRRE) <columns-inline>`,
When localizing a record with :ref:`inline elements (IRRE) <t3tca:columns-inline-introduction>`,
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.
Expand Down
62 changes: 0 additions & 62 deletions Documentation/Settings.cfg

This file was deleted.

21 changes: 21 additions & 0 deletions Documentation/guides.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<guides xmlns="https://www.phpdoc.org/guides"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
links-are-relative="true">
<extension class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/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"
edit-on-github-branch="11.5"
edit-on-github="TYPO3-Documentation/TYPO3CMS-Guide-FrontendLocalization"
typo3-core-preferred="11.5"
interlink-shortcode="typo3/guide-frontendlocalization"
/>
<project title="Frontend Localization Guide"
release="11.5"
version="11.5"
copyright="since 2012 by the TYPO3 contributors"
/>
</guides>
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 71a3ef2

Please sign in to comment.