Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Switch to PHP-based documentation rendering #519

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/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
38 changes: 1 addition & 37 deletions Documentation/Includes.rst.txt
Original file line number Diff line number Diff line change
@@ -1,37 +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:: fluid(code)
:class: html

.. 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
.. You can put central messages to display on all pages here
1 change: 0 additions & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ output those in various ways:
:hidden:

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

This file was deleted.

2 changes: 1 addition & 1 deletion Documentation/Tutorials/Linkhandler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Configuration for the backend
browser in the backend. See
:ref:`Setting page TSconfig <t3tsconfig:setting-page-tsconfig>`.

For all available options see :ref:`linkhandler-pagetsconfig`.
For all available options see :ref:`t3coreapi:linkhandler-pagetsconfig`.

.. code-block:: typoscript
:caption: EXT:my_sitepackage/Configuration/page.tsconfig
Expand Down
7 changes: 0 additions & 7 deletions Documentation/genindex.rst

This file was deleted.

19 changes: 19 additions & 0 deletions Documentation/guides.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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/tt_address"
project-contact="https://typo3.slack.com/archives/C02AUJ7JJ"
project-repository="https://github.com/FriendsOfTYPO3/tt_address"
project-issues="https://github.com/FriendsOfTYPO3/tt_address/issues"
edit-on-github-branch="master"
edit-on-github="https://github.com/FriendsOfTYPO3/tt_address"
typo3-core-preferred="stable"
interlink-shortcode="friendsoftypo3/tt-address"
/>
<project title="Address List"
release="main (development)"
version="main (development)"
copyright="since 2002 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 docs (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: codesnippets
codesnippets: ## Regenerate automatic code snippets
.Build/vendor/bin/typo3 codesnippet:create Documentation/CodeSnippets/
Loading