Skip to content

Commit

Permalink
[TASK] Switch Documentation Rendering to PHP (#737)
Browse files Browse the repository at this point in the history
You can try out the rendering locally with
```
make docs
```
  • Loading branch information
Alagts authored Mar 24, 2024
1 parent d2488fc commit 2e1e969
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 72 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ indent_style = tab

[*{.phpt,htmlt}]
insert_final_newline = false

# 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: 0 additions & 1 deletion Documentation/GeneratedExtension/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ reStructuredText and Sphinx can be found in the official TYPO3 documentation:
* :ref:`introduction to reST & Sphinx <h2document:writing-rest-introduction>`
* :ref:`h2document:rest-cheat-sheet`
* :ref:`h2document:format-rest-cgl`
* :ref:`h2document:rest-common-pitfalls`

.. _render-documentation:

Expand Down
1 change: 0 additions & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@ even if you change the extension in the graphical editor.
:hidden:

Sitemap
genindex
63 changes: 0 additions & 63 deletions Documentation/Settings.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions Documentation/genindex.rst

This file was deleted.

27 changes: 27 additions & 0 deletions Documentation/guides.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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://extensions.typo3.org/extension/extension_builder"
project-contact="https://typo3.slack.com/archives/C0CEB3BMY"
project-repository="https://github.com/FriendsOfTYPO3/extension_builder"
project-issues="https://github.com/FriendsOfTYPO3/extension_builder/issues"
edit-on-github-branch="master"
edit-on-github="FriendsOfTYPO3/extension_builder"
typo3-core-preferred="11.5"
interlink-shortcode="friendsoftypo3/extension-builder"
/>
<project title="Extension Builder"
release="main (development)"
version="main (development)"
copyright="since 2009 by the TYPO3 contributors"
/>
<inventory id="t3coreapi-latest"
url="https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/"
/>
<inventory id="t3extbasebook"
url="https://docs.typo3.org/m/typo3/book-extbasefluid/10.4/en-us/"
/>
</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 2e1e969

Please sign in to comment.