Skip to content

Commit

Permalink
[TASK] make it possible to generate docs in PDF
Browse files Browse the repository at this point in the history
This change makes it possible to generate the docs in pdf format.
This is required for EXT:solr* EB addons.
  • Loading branch information
dkd-kaehm committed Jul 3, 2023
1 parent 9886e74 commit f481dce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Build/generate_documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,29 @@ 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}"
mv -v "Documentation-GENERATED-temp/Result/project/0.0.0" "${PRODUCTION_DOCS_PATH}"
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
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down

0 comments on commit f481dce

Please sign in to comment.