Migration

PHP-based TYPO3 documentation rendering
 avataruser_4375421
Public2 years ago8 snippets
Step-1-Start-modifying-settings-file.ps1
Step-2-Delete-or-modify-files.rst
Step-3-Modify-guides.xml
Step-4-Create-files-locally.ps1
Step-7-Include-tests-(Github-actions).yaml
Step-8-Pre-configuration-for-Makefile.txt
Step-9-Makefile.txt
Step-11-Perform-make-docs.ps1
Generate the guides.xml
Step-1-Start-modifying-settings-file.ps1
docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest migrate Documentation
Empty your file Includes.rst.txt and add this comment.
Step-2-Delete-or-modify-files.rst
.. You can put central messages to display on all pages here
Insert this attribute in your extension tag with appropriate name from your composer.json.
Step-3-Modify-guides.xml
interlink-shortcode="my-vendor/my-ext-key"
Step-4-Create-files-locally.ps1
# Create a directory
mkdir -p Documentation-GENERATED-temp

# Execute the Docker container that is provided remotely.
# Renders all files in the `Documentation` and store in `Documentation-GENERATED-temp`.
# On macOS you need to specify the parameter "--user=$(id -u):$(id -g)"
docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation
Code for ext_key/.github/workflows/test-documentation.yml
Step-7-Include-tests-(Github-actions).yaml
name: test documentation  
  
on: [ push, pull_request ]  
  
jobs:  
  tests:  
    name: documentation  
    runs-on: ubuntu-latest  
    steps:  
      - name: Checkout  
Add these lines to file .editorconfig (phpstorm)
Step-8-Pre-configuration-for-Makefile.txt
# Makefile  
[{Makefile,**.mk}]  
# Use tabs for indentation (Makefiles require tabs)  
indent_style = tab

Step 9: Makefile

2 years ago
Create the Makefile
Step-9-Makefile.txt
.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  
  
Render documentation locally
Step-11-Perform-make-docs.ps1
make docs