forked from ORGANISATION-KA-INTERNATIONALE/FEDIVERSE-OKI
docs: add one-command README HTML/PDF export
This commit is contained in:
+40
-2
@@ -161,7 +161,9 @@ Toutes ces sources sont modifiables dans `includes/config.local.php` (voir <<fr-
|
||||
│ ├── castopod-podcasts.css # castopod, funkwhale, wordpress, grille…)
|
||||
│ └── …
|
||||
├── docs/
|
||||
│ └── wireframes/ # Maquettes d'origine (PNG desktop + mobile)
|
||||
│ ├── wireframes/ # Maquettes d'origine (PNG desktop + mobile)
|
||||
│ ├── docinfo.html # Styles d'impression (fallback emoji) pour l'export
|
||||
│ └── generate-readme-pdf.sh # Export de la doc : README.html / README.pdf
|
||||
├── img/ # Logo, favicons, icône de lecture
|
||||
├── includes/
|
||||
│ ├── config.php # Bootstrap + fonctions API (PeerTube, Castopod,
|
||||
@@ -870,6 +872,23 @@ Bonnes pratiques du dépôt :
|
||||
- Ne versionnez jamais `config.local.php` ni les fichiers dérivés des `.sample`
|
||||
- Quelques constantes sont définies mais non utilisées par le code actuel (`ENABLE_SEARCH`, `ENABLE_COMMENTS`, `ENABLE_USER_ACCOUNTS`, `TAG_SHORT`) : ne vous en servez pas comme points d'extension
|
||||
|
||||
==== 📄 Exporter la documentation (HTML / PDF)
|
||||
|
||||
Ce README peut être exporté en HTML et en PDF en une seule commande :
|
||||
|
||||
[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
|
||||
----
|
||||
|
||||
Les fichiers sont produits à la racine du projet 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.
|
||||
|
||||
NOTE: `asciidoctor-pdf` (utilisé par l'extension AsciiDoc de VSCodium) n'est pas utilisable ici : son moteur Prawn ne sait pas embarquer les polices emoji couleur (CBDT/COLR), les émojis disparaissent du PDF. Chromium les gère nativement.
|
||||
|
||||
=== 📜 Licence
|
||||
|
||||
Copyright (C) 2025 Cédric Famibelle-Pronzola & *ORGANISATION KA INTERNATIONALE*
|
||||
@@ -1034,7 +1053,9 @@ All of these sources can be changed in `includes/config.local.php` (see <<en-con
|
||||
│ ├── castopod-podcasts.css # castopod, funkwhale, wordpress, grid…)
|
||||
│ └── …
|
||||
├── docs/
|
||||
│ └── wireframes/ # Original mockups (desktop + mobile PNGs)
|
||||
│ ├── wireframes/ # Original mockups (desktop + mobile PNGs)
|
||||
│ ├── docinfo.html # Print styles (emoji fallback) for the export
|
||||
│ └── generate-readme-pdf.sh # Docs export: README.html / README.pdf
|
||||
├── img/ # Logo, favicons, play icon
|
||||
├── includes/
|
||||
│ ├── config.php # Bootstrap + API functions (PeerTube, Castopod,
|
||||
@@ -1743,6 +1764,23 @@ Repository best practices:
|
||||
- Never version `config.local.php` or files derived from the `.sample` files
|
||||
- A few constants are defined but unused by the current code (`ENABLE_SEARCH`, `ENABLE_COMMENTS`, `ENABLE_USER_ACCOUNTS`, `TAG_SHORT`): do not rely on them as extension points
|
||||
|
||||
==== 📄 Exporting the documentation (HTML / PDF)
|
||||
|
||||
This README can be exported to HTML and PDF with a single command:
|
||||
|
||||
[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
|
||||
----
|
||||
|
||||
Files are produced in the project root 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.
|
||||
|
||||
NOTE: `asciidoctor-pdf` (used by VSCodium's AsciiDoc extension) cannot be used here: its Prawn engine cannot embed color-emoji fonts (CBDT/COLR), so emoji disappear from the PDF. Chromium handles them natively.
|
||||
|
||||
=== 📜 License
|
||||
|
||||
Copyright (C) 2025 Cédric Famibelle-Pronzola & *ORGANISATION KA INTERNATIONALE*
|
||||
|
||||
Reference in New Issue
Block a user