From f481dce0fe0e1fd8c765c250ca794c223bfdc6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20K=C3=A4hm?= Date: Mon, 3 Jul 2023 09:52:32 +0200 Subject: [PATCH] [TASK] make it possible to generate docs in PDF This change makes it possible to generate the docs in pdf format. This is required for EXT:solr* EB addons. --- Build/generate_documentation.sh | 20 +++++++++++++++++++- composer.json | 3 +++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Build/generate_documentation.sh b/Build/generate_documentation.sh index dbfc0d8d63..0e9f08752a 100755 --- a/Build/generate_documentation.sh +++ b/Build/generate_documentation.sh @@ -24,7 +24,7 @@ if ! command -v dockrun_t3rd &> /dev/null; then source <(docker run --rm ghcr.io/t3docs/render-documentation show-shell-commands) fi -dockrun_t3rd makehtml-no-cache +dockrun_t3rd makehtml-no-cache -c make_singlehtml 1 if [[ "$BUILD_DOCS_FOR_PRODUCTION" == 1 || "$BUILD_DOCS_FOR_PRODUCTION" == "true" ]]; then rm -Rf "${PRODUCTION_DOCS_PATH}" @@ -32,3 +32,21 @@ if [[ "$BUILD_DOCS_FOR_PRODUCTION" == 1 || "$BUILD_DOCS_FOR_PRODUCTION" == "true ln -sf "${PRODUCTION_DOCS_PATH}" "Documentation.HTML" rm -Rf "Documentation-GENERATED-temp" fi + +if [[ "$BUILD_DOCS_IN_PDF" == 1 || "$BUILD_DOCS_IN_PDF" == "true" ]]; then + rm -Rf "Documentation-GENERATED-temp" + dockrun_t3rd makeall + dockrun_t3rd makehtml -c make_latex 1 -c make_pdf 1 + docker run --rm \ + -v $(pwd):/PROJECT \ + -v $(pwd)/Documentation-GENERATED-temp:/RESULT \ + t3docs/render-documentation:develop \ + makeall -c jobfile /PROJECT/Documentation/jobfile.json + docker run --rm \ + -v $(pwd)/Documentation-GENERATED-temp/Result/latex:/RESULT \ + --workdir="/RESULT/" \ + thomasweise/docker-texlive-full:latest \ + "./run-make.sh" + mv Documentation-GENERATED-temp/Result/latex/PROJECT.pdf Documentation.pdf + rm -Rf "Documentation-GENERATED-temp" +fi diff --git a/composer.json b/composer.json index 2a7de6290b..888e1b88f8 100644 --- a/composer.json +++ b/composer.json @@ -84,6 +84,9 @@ "t3:docs:build:prod": [ "BUILD_DOCS_FOR_PRODUCTION=1 $COMPOSER_BINARY t3:docs:build" ], + "t3:docs:build:pdf": [ + "BUILD_DOCS_IN_PDF=1 $COMPOSER_BINARY t3:docs:build" + ], "t3:docs:clean": [ "rm -Rf Documentation-GENERATED-temp/ $(readlink -f Documentation.HTML) Documentation.HTML" ],