** : The provided file (absolute path) is used as a style.
-* &style=**source** : The source code of the page is sent to the browser, see below…
-* &style=**pre** : The source code of the page is sent to the browser enclosed in ////, see below…
-
-## URL rewriting to set the style to use
-
-Modifying the web server configuration works but it's rather heavy. It's possible to test a particular style this way:
-> https://site.tld/htmgem/index.php?url=/url/page.gmi&style=<…>
-
-It's also possible to make a URL rewriting which incorporate the style:
-> rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1;
-> rewrite ^(.+\.gmi)\ *\|\ *([\w_]+)$ /htmgem/index.php?rw=1&url=$1&style=$2;
-
-For instance, when it's activated:
-=> configuration-en.gmi%20|%20pre Shows the readable source code on the screen, using the markup ****.
-=> configuration-en.gmi%20|%20source configuration-en.gmi | source : Downloads the source code.
-
-### With style already included…
-
-=> configuration-en.gmi%20|%20htmgem Style //HtmGem//, the default style
-=> configuration-en.gmi%20|%20none Style //none//
-=> configuration-en.gmi%20|%20terminal Style //terminal//
-=> configuration-en.gmi%20|%20black_wide Style //black wide//
-=> configuration-en.gmi%20|%20simple Style //simple//
-=> configuration-en.gmi%20|%20raw Style //raw//
-=> configuration-en.gmi%20|%20debug Style //debug//
-
-=> ../css Style selector: the page containing the style allows to test them 😎
-
-## Text decoration
-
-The text decoration, which interprets the **bold** for instance, is not part of GemText definition. The text decoration applies everywhere except on the titles and preformated texts.
-
-### Disable the text decoration
-
-It's possible to:
-* disable and enable the text decoration with a line **^^^**,
-* add what follows to the URL **rewriting**:
-> &textDecoration=0
-
-## BNF / Syntax
-
-HtmGem uses a precise implementation of the GemText BNF. It indicates exactly what text portions are to be used.
-=> BNF-en.gmi BNF
-
-=> tutogemtext-en.gmi How to build GemText pages?
-
-———————————————————— ————————————————————
-
-Amongst the distributed files and directories, only the ones below are useful for HtmGem:
-* **htmgem/*.php** : These files translate the GemText to HTML.
-* **htmgem/css/htmgem.css** : If it's missing, the display will be without style — literally.
-* **htmgem/css/…** : Keep the styles you use.
-The others can be deleted (included this present file //configuration-en.gmi//) although they are not harmful.
diff --git a/docs/configuration-fr.gmi b/docs/configuration-fr.gmi
deleted file mode 100644
index 52f4f91..0000000
--- a/docs/configuration-fr.gmi
+++ /dev/null
@@ -1,63 +0,0 @@
-# Configuration avancée
-❗️ Cette page fonctionne avec la réécriture d’URL activée ❗️
-
-Par défaut, le même style est utilisé pour toutes les pages, //htmgem/css/htmgem.css//, sauf lorsqu’un fichier ayant le même nom que la page mais avec l’extension **.css** existe dans le même répertoire. Dans ce cas, il est utilisé.
-
-Lorsque l’option css est activé dans la configuration (voir //rewrite// plus bas) d’autres comportements sont possibles. **Attention**, cela ne fonctionnera pas avec un client Gemini puisque HtmGem n’est accessible que via un navigateur web.
-* &style=**htmgem** : Utilise le style par défaut.
-* &style=**none** : La page HTML est envoyée sans style.
-* &style=**** : Le fichier htmgem/css/.css est utilisé en tant que style.
-* &style=**/** : Le fichier indiqué (chemin absolu) est utilisé en tant que style.
-* &style=**source** : Le code source de la page est envoyée au navigateur, voir ci-après…
-* &style=**pre** : Le code source de la page est envoyée au navigateur encadré par des ////, voir ci-après…
-
-## Réécriture d’URL pour préciser le style à utiliser
-
-Modifier la configuration du serveur web fonctionne mais est assez lourd. On peut tester un style en particulier de la façon suivante :
-> https://site.tld/htmgem/index.php?url=/url/page.gmi&style=<…>
-
-Il est aussi possible de faire une réécriture d’URL qui intègre le style :
-> rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1;
-> rewrite ^(.+\.gmi)\ *\|\ *([\w_]+)$ /htmgem/index.php?rw=1&url=$1&style=$2;
-
-Par exemple, lorsque ce sera activé :
-=> configuration-fr.gmi%20|%20pre Produit le code source de façon lisble à l’écran en utilisant la balise ****.
-=> configuration-fr.gmi%20|%20source configuration-fr.gmi | source : Téléverse le code source.
-
-### Avec les styles déjà fournis…
-
-=> configuration-fr.gmi%20|%20htmgem Style //HtmHem//, le style par défaut
-=> configuration-fr.gmi%20|%20none Style //none//
-=> configuration-fr.gmi%20|%20terminal Style //terminal//
-=> configuration-fr.gmi%20|%20black_wide Style //black wide//
-=> configuration-fr.gmi%20|%20simple Style //simple//
-=> configuration-fr.gmi%20|%20raw Style //brut//
-=> configuration-fr.gmi%20|%20debug Style //debug//
-
-=> ../css Sélecteur de style : la page contenant les styles permet de les essayer 😎
-
-## Décoration du texte
-
-La décoration du texte, qui interprête le **gras** par exemple, ne fait pas partie de la définition de GemText. La décoration du texte s’applique partout sauf sur les titres et blocs préformatés.
-
-### Désactiver la décoration du texte
-
-On peut :
-* désactiver et activer la décoration du texte avec une ligne **^^^**,
-* ajouter ce qui suit à la **réécriture** d’URL :
-> &textDecoration=0
-
-## BNF / Syntax
-
-HtmGem utilise une implémentation précise de la BNF de GemText. Il indique exactement quelle portions de texte doivent être utilisées.
-=> BNF-fr.gmi BNF
-
-=> tutogemtext-fr.gmi Comment faire des pages GemText ?
-
-———————————————————— ————————————————————
-
-Parmi les fichiers et répertoires distribués, seuls sont utiles pour le fonctionnement de HtmGem :
-* **htmgem/*.php** : Ces fichiers se chargent de traduire le GemText en HTML.
-* **htmgem/css/htmgem.css** : S’il manque, l’affichage sera dépourvu de style — littéralement.
-* **htmgem/css/…** : Conservez les styles que vous utilisez.
-Les autres peuvent être supprimés (y compris ce présent fichier //configuration-fr.gmi//) bien qu’ils ne présentent aucun danger.
diff --git a/docs/index.gmi b/docs/index.gmi
index bc2aaa3..5fbfa7a 100644
--- a/docs/index.gmi
+++ b/docs/index.gmi
@@ -1,9 +1,12 @@
-# Developers' documentation
-
-=> BNF-en.gmi BNF / Backus-Naur Form
+# Documentation
=> https://gmi.sbgodin.fr/htmgem Project main page
=> https://tildegit.org/Sbgodin/htmgem Source code, comments
=> https://gemini.circumlunar.space Main Gemini capsule
+
=> ../CHANGELOG.gmi Change log
-=> ../COPYING.gmi Licence Gnu Affero General Public License v3 — 19 november 2007
+=> ../COPYING.gmi License Gnu Affero General Public License v3 — 19 november 2007
+=> BNF.gmi BNF / Backus-Naur Form
+
+=> ../css Styles 😎
+=> ../tests Tests 😅
diff --git a/docs/installation-en.gmi b/docs/installation-en.gmi
index b3a03de..aacb78b 100644
--- a/docs/installation-en.gmi
+++ b/docs/installation-en.gmi
@@ -1,42 +1,44 @@
-# HtmGem, installation
+# To install HtmGem
-To run HtmGem — after having copied the files — there is nothing to do but to add the URL rewriting rules.
+* Download HtmGem
+=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip
+* Copy the files at the root of the website.
+* Configurer la réécriture d’URL (//URL Rewriting//).
+* Write some text in /index.gmi.
+* Just open your website!
-## Prerequisites
+* Go to /htmgem to get the documentation.
+
+### Prerequisites
* Php v7.3 minimum
-* Module **php-mbstring** to manage unicode
-* A web server (Apache and Nginx tested)
-* Module **mod-rewrite** to handle the Gemini pages
-
-## Installation
-
-### Download
-=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip Stable version
-=> https://tildegit.org/Sbgodin/htmgem Project repository
+* Module **Php-mbstring** to handle l’unicode
+* A web server (Apache and Nginx supported)
+* Module **mod-rewrite** for the URL rewriting
### Nginx
```
-# This text must be placed in the server's configuration
index index.gmi index.php index.html
-rewrite ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1;
+rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1&style=default,htmgem.css;
+error_page 403 /htmgem;
+location = /favicon.ico { alias /var/www/dev/htmgem/favicon.ico; }
```
### Apache
```
-# This text can be placed at the root of the web site in a file ".htaccess".
DirectoryIndex index.gmi index.php index.html
RewriteEngine on
-RewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1
+rewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1&style=default,htmgem.css
```
-Afterwards,
-* When a file ends by **.gmi.** is asked, HtmGem will display it in the browser.
-* When only the directory is asked (http://site.tld/path) the file //index.gmi// will be automatically choosen.
+## Text decoration
-=> tutogemtext-en.gmi How to build GemText pages?
+The text decoration, which interprets the bold for instance, is not part of GemText definition. The text decoration applies everywhere except on the titles and preformated texts.
-## Advanced configuration
+It's possible to disable the text decoration with a line **^^^** or add to the URL rewriting:
+> &textDecoration=0
-Add additional styles as a link parameter or adapt the text decoration:
-=> configuration-en.gmi Advanced configuration
+
+=> ../css Styles
+
+=> tutogemtext-en.gmi How to make GemText pages?
diff --git a/docs/installation-fr.gmi b/docs/installation-fr.gmi
index 798efb7..9cdac51 100644
--- a/docs/installation-fr.gmi
+++ b/docs/installation-fr.gmi
@@ -1,42 +1,44 @@
-# HtmGem, installation
+# Pour installer HtmGem
-Pour faire fonctionner HtmGem — après avoir copié les fichiers — il ne reste qu’à ajouter les règles de réécriture d’URL (//URL Rewriting//).
+* Télécharger HtmGem
+=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip
+* Copier les fichiers à la racine du site.
+* Configurer la réécriture d’URL (//URL Rewriting//).
+* Écrire du texte dans /index.gmi.
+* Ouvrir la page du site!
+
+* Accéder à /htmgem pour la documentation.
## Prérequis
* Php v7.3 minimum
* Module **Php-mbstring** pour gérer l’unicode
-* Un serveur web (Apache et Nginx testés)
-* Module **mod-rewrite** pour prendre en charge les pages Gemini
-
-## Installation
-
-### Téléchargement
-=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip Version stable
-=> https://tildegit.org/Sbgodin/htmgem Dépôt du projet
+* Un serveur web (Apache et Nginx supportés)
+* Module **mod-rewrite** pour la réécriture d’URL
### Nginx
```
-# Ce texte doit être placé dans la configuration du serveur.
index index.gmi index.php index.html
-rewrite ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1;
+rewrite ^(.+\.gmi)$ /htmgem/index.php?rw=1&url=$1&style=default,htmgem.css;
+error_page 403 /htmgem;
+location = /favicon.ico { alias /var/www/dev/htmgem/favicon.ico; }
```
### Apache
```
-# Ce texte peut se placer à la racine du site dans un fichier ".htaccess".
DirectoryIndex index.gmi index.php index.html
RewriteEngine on
-RewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1
+rewriteRule ^(.+\.gmi)$ htmgem/index.php?rw=1&url=$1&style=default,htmgem.css
```
-Par la suite,
-* Quand un fichier se terminant par **.gmi** sera demandé, HtmGem l’affichera dans le navigateur.
-* Quand seul le répertoire sera demandé (http://site.tld/path) le fichier //index.gmi// sera automatiquement choisi.
+## Décoration du texte
+
+La décoration du texte, qui interprête le **gras** par exemple, ne fait pas partie de la définition de GemText. La décoration du texte s’applique partout sauf sur les titres et blocs préformatés.
+
+On peut désactiver la décoration du texte avec une ligne **^^^** ou ajouter à la **réécriture** d’URL :
+> &textDecoration=0
+
+
+=> ../css Styles
=> tutogemtext-fr.gmi Comment faire des pages GemText ?
-
-## Configuration avancée
-
-Ajoutez des styles supplémentaires en paramètre de lien ou adaptez la décoration du texte :
-=> configuration-fr.gmi Configuration avancée
diff --git a/docs/tutogemtext-en.gmi b/docs/tutogemtext-en.gmi
index 163f169..28a4f4a 100644
--- a/docs/tutogemtext-en.gmi
+++ b/docs/tutogemtext-en.gmi
@@ -71,4 +71,4 @@ HtmGem allows to host Gemini pages and publish them on a web server with **Php**
### License of this page
This page is under the free licence **CC BY-SA 2.0**.
=> https://creativecommons.org/licenses/by-sa/2.0/en/ Text under license CC BY-SA 2.0
-=> gemini://gmi.sbgodin.fr/ gemini://gmi.sbgodin.fr/ ⸻ Christophe HENRY
+=> https://gmi.sbgodin.fr/ https://gmi.sbgodin.fr/ ⸻ Christophe HENRY
diff --git a/docs/tutogemtext-fr.gmi b/docs/tutogemtext-fr.gmi
index dd1c3e0..8616fbb 100644
--- a/docs/tutogemtext-fr.gmi
+++ b/docs/tutogemtext-fr.gmi
@@ -68,7 +68,7 @@ HtmGem permet d’héberger des pages Gemini et de les publier sur un serveur we
=> https://gmi.sbgodin.fr/htmgem
-### License de cette page
+### Licence de cette page
Cette page est sous licence libre **CC BY-SA 2.0**.
=> https://creativecommons.org/licenses/by-sa/2.0/fr/ Texte sous licence CC BY-SA 2.0
-=> gemini://gmi.sbgodin.fr/ gemini://gmi.sbgodin.fr/ ⸻ Christophe HENRY
+=> https://gmi.sbgodin.fr/ https://gmi.sbgodin.fr/ ⸻ Christophe HENRY
diff --git a/index.gmi b/index.gmi
index 070df28..13b6ac5 100644
--- a/index.gmi
+++ b/index.gmi
@@ -1,13 +1,19 @@
-# HtmGem
+```
+ __ __ __ ______
+|\ \ |\ \ |\ \ /\ \ v1.5.0
+| ▓▓ | ▓▓_| ▓▓_ ______ ____ | ▓▓▓▓▓▓\
+| ▓▓__| ▓▓ ▓▓ \ |\ \ \| ▓▓ __\▓▓/\ \| \ \
+| ▓▓ ▓▓\▓▓▓▓▓▓ | ▓▓▓▓▓▓\▓▓▓▓\ ▓▓| \ ▓▓▓▓▓▓\ ▓▓▓▓▓▓\▓▓▓▓\
+| ▓▓▓▓▓▓▓▓ | ▓▓ __| ▓▓ | ▓▓ | ▓▓ ▓▓ \▓▓▓▓ ▓▓ ▓▓ ▓▓ | ▓▓ | ▓▓
+| ▓▓ | ▓▓ | ▓▓| \ ▓▓ | ▓▓ | ▓▓ ▓▓__| ▓▓ ▓▓▓▓▓▓▓▓ ▓▓ | ▓▓ | ▓▓
+| ▓▓ | ▓▓ \▓▓ ▓▓ ▓▓ | ▓▓ | ▓▓\▓▓ ▓▓\▓▓ \ ▓▓ | ▓▓ | ▓▓
+ \▓▓ \▓▓ \▓▓▓▓ \▓▓ \▓▓ \▓▓ \▓▓▓▓▓▓ \▓▓▓▓▓▓▓\▓▓ \▓▓ \▓▓
-=> docs/installation-fr.gmi Installation de HtmGem, en français
-HtmGem rend vos pages **Gemini** accessibles sur le web. Il fonctionne aussi en hébergement mutualisé.
-=> docs/tutogemtext-fr.gmi Tutoriel GemText
+```
-=> docs/installation-en.gmi HtmGem installation, in English
-HtmGem makes your **Gemini** pages reachable on the web. It can be used on a shared host.
-=> docs/tutogemtext-en.gmi GemText tutorial
+=> docs/installation-fr.gmi 🇫🇷 HtmGem rend vos pages **Gemini** accessibles sur le web.
+
+=> docs/installation-en.gmi 🇺🇸 HtmGem makes your **Gemini** pages reachable on the web.
-=> docs/index.gmi **Developers' documentation**
-The documentation (in English) for the developers's stands here. Please read them carefully before doing anything on the source code.
+=> docs/index.gmi 🇺🇸 **Documentation**
diff --git a/tests/index.gmi b/tests/index.gmi
index bd9d6ee..b6a1c01 100644
--- a/tests/index.gmi
+++ b/tests/index.gmi
@@ -1,6 +1,8 @@
# Tests
-This test suite aims to check the quality of the translation of the fulltext source pages to HTML pages. As usual, its purpose is to protect the project against regression. So these tests should be run before commits (see **./cli/precommit.git**).
+This test suite aims to check the quality of the translation of the fulltext source pages to HTML pages.
+
+In the HtmGem root directory, just type **phpunit tests** to check.
### parserTest.php
The parser takes the gemtext contained in the **.gmi** file and returns the internal format.
@@ -11,9 +13,10 @@ The translator takes the gemtext, parse it and returns an HTML representation.
### translateToGemtextTest.php
This translator takes the gemtext, parse it and rebuild the gemtext. The output must be identical of the input. When there are optional spaces, they are trimmed. In such cases, the translation will return a kind of normalised gemtext — that is, without the spaces.
-### ./cli
-It contains files to play around with the API:
+### cli
+The directory contains files to play around with the API:
* parse_gemtext: outputs a //print_r()// of the internal representation
* translate_to_gemtext: outputs the regenerated gemtext
* translate_to_html: outputs the html-ified gemtext
-//pre-commit.git// is to be moved to //./.git/hooks/pre-commit//, be //chmod x//-ed to run this test suit before committing.
+
+//pre-commit.git// is to be moved to //./.git/hooks/pre-commit// and //chmod x//-ed to run this test suit before committing.