feat: accept any .adoc file in PDF generation script

This commit is contained in:
2026-07-25 16:51:05 +04:00
parent 84013376f2
commit 4a4b56296e
3 changed files with 55 additions and 30 deletions
+14 -10
View File
@@ -892,16 +892,18 @@ Bonnes pratiques du dépôt :
==== 📄 Exporter la documentation (HTML / PDF)
Ce README peut être exporté en HTML et en PDF en une seule commande :
Ce README peut être exporté en HTML et en PDF en une seule commande (tout fichier `.adoc` peut être passé en argument) :
[source,bash]
----
docs/generate-readme-pdf.sh # README.html + README.pdf
docs/generate-readme-pdf.sh --html # HTML seulement
docs/generate-readme-pdf.sh --pdf # PDF seulement
docs/generate-readme-pdf.sh # README.html + README.pdf
docs/generate-readme-pdf.sh --html # HTML seulement
docs/generate-readme-pdf.sh --pdf # PDF seulement
docs/generate-readme-pdf.sh DEPLOY.adoc # DEPLOY.html + DEPLOY.pdf
docs/generate-readme-pdf.sh DEPLOY.adoc --pdf # DEPLOY.pdf seulement
----
Les fichiers sont produits à la racine du projet et ignorés par Git (`.gitignore`).
Les fichiers sont produits à la racine du projet (nommés d'après la source) et ignorés par Git (`.gitignore`).
Prérequis : `asciidoctor`, `chromium` (rendu headless) et le paquet `fonts-noto-color-emoji` (émojis couleur dans le PDF). La feuille de style `docs/docinfo.html` (fallback emoji + règles d'impression) est injectée automatiquement via le mécanisme `docinfo` d'Asciidoctor.
@@ -1820,16 +1822,18 @@ Repository best practices:
==== 📄 Exporting the documentation (HTML / PDF)
This README can be exported to HTML and PDF with a single command:
This README can be exported to HTML and PDF with a single command (any `.adoc` file can be passed as argument):
[source,bash]
----
docs/generate-readme-pdf.sh # README.html + README.pdf
docs/generate-readme-pdf.sh --html # HTML only
docs/generate-readme-pdf.sh --pdf # PDF only
docs/generate-readme-pdf.sh # README.html + README.pdf
docs/generate-readme-pdf.sh --html # HTML only
docs/generate-readme-pdf.sh --pdf # PDF only
docs/generate-readme-pdf.sh DEPLOY.adoc # DEPLOY.html + DEPLOY.pdf
docs/generate-readme-pdf.sh DEPLOY.adoc --pdf # DEPLOY.pdf only
----
Files are produced in the project root and are Git-ignored (`.gitignore`).
Files are produced in the project root (named after the source) and are Git-ignored (`.gitignore`).
Requirements: `asciidoctor`, `chromium` (headless rendering) and the `fonts-noto-color-emoji` package (color emoji in the PDF). The `docs/docinfo.html` stylesheet (emoji fallback + print rules) is automatically injected through Asciidoctor's `docinfo` mechanism.