Skip to content

Commit

Permalink
Merge pull request #40 from Alagts/task/rendering
Browse files Browse the repository at this point in the history
[TASK] Switch to PHP-based Documentation Rendering
  • Loading branch information
evoWeb authored Dec 3, 2024
2 parents 771f3c7 + a3a7758 commit c629222
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 31 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@ indent_size = 4

[*.neon]
indent_style = tab

# 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 --minimal-test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ config/
var/
*.cache
composer.lock
.idea/
Documentation-GENERATED-temp/
14 changes: 1 addition & 13 deletions Documentation/Includes.txt
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,3 @@ a GNU/GPL CMS/Framework available from http://typo3.org

Introduction/Index
Installation/Index
Configuration/Index
Breaking/Index
Testing/Index
15 changes: 0 additions & 15 deletions Documentation/Settings.cfg

This file was deleted.

20 changes: 20 additions & 0 deletions Documentation/guides.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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://github.com/evoWeb/sessionplaner"
project-repository="https://github.com/evoWeb/sessionplaner"
project-issues="https://github.com/evoWeb/sessionplaner/issues"
edit-on-github-branch="develop"
edit-on-github="evoweb/sessionplaner"
typo3-core-preferred="stable"
interlink-shortcode="evoweb/sessionplaner"
/>
<project title="sessionplaner"
release="4.0.0"
copyright="since 2013 by evoWeb"
/>
</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 --minimal-test

0 comments on commit c629222

Please sign in to comment.