** : 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/?url=$1;
+> rewrite ^(.+\.gmi)\ *\|\ *([\w_]+)$ /htmgem/?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.
+
+=> ../css Sélecteur de style : the page containing the style allows to test them 😎
+
+### 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//
+
+## 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
index 751c499..bb56bc9 100644
--- a/docs/configuration-fr.gmi
+++ b/docs/configuration-fr.gmi
@@ -1,12 +1,12 @@
# Configuration avancée
-Par défaut, le style est incorporé dans chaque page récupérée par le navigateur web. 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é.
+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 haut) 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, mais en tant que fichier externe.
+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 externe.
-* &style=**/** : Le fichier indiqué (chemin absolu) est utilisé en tant que style externe.
+* &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…
@@ -20,17 +20,20 @@ Il est aussi possible de faire une réécriture d’URL qui intègre le style :
> rewrite ^(.+\.gmi)\ *\|\ *([\w_]+)$ /htmgem/?url=$1&style=$2;
Par exemple, lorsque ce sera activé :
-=> index-fr.gmi%20|%20pre Produit le code source de façon lisble à l’écran en utilisant la balise ****.
-=> index-fr.gmi%20|%20source Le lien index-fr.gmi | source Téléverse le code source.
+=> 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.
=> ../css Sélecteur de style : la page contenant les styles permet de les essayer 😎
### Avec les styles déjà fournis…
-=> index-fr.gmi%20|%20none Style //none//
-=> index-fr.gmi%20|%20terminal Style //terminal//
-=> index-fr.gmi%20|%20black_wide Style //black wide//
-=> index-fr.gmi%20|%20simple Style //simple//
+=> 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//
## Décoration du texte
@@ -43,12 +46,17 @@ On peut :
* 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/*.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 //index-fr.gmi//) bien qu’ils ne présentent aucun danger.
+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
new file mode 100644
index 0000000..45b2d63
--- /dev/null
+++ b/docs/index.gmi
@@ -0,0 +1,7 @@
+# Developers' 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
diff --git a/docs/installation-en.gmi b/docs/installation-en.gmi
new file mode 100644
index 0000000..07db762
--- /dev/null
+++ b/docs/installation-en.gmi
@@ -0,0 +1,42 @@
+# HtmGem, installation
+
+To run HtmGem — after having copied the files — there is nothing to do but to add the URL rewriting rules.
+
+## 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
+
+### Nginx
+```
+# This text must be placed in the server's configuration
+index index.php index.gmi index.html
+rewrite ^(.+\.gmi)$ htmgem/?url=$1;
+```
+
+### Apache
+```
+# This text can be placed at the root of the web site in a file ".htaccess".
+DirectoryIndex index.php index.gmi index.html
+RewriteEngine on
+RewriteRule ^(.+\.gmi)$ htmgem/?url=$1
+```
+
+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.
+
+=> tutogemtext-en.gmi How to build GemText pages?
+
+## Advanced configuration
+
+Add additional styles as a link parameter or adapt the text decoration:
+=> configuration-en.gmi Advanced configuration
diff --git a/docs/index-fr.gmi b/docs/installation-fr.gmi
similarity index 90%
rename from docs/index-fr.gmi
rename to docs/installation-fr.gmi
index 99ffffc..10c6e7d 100644
--- a/docs/index-fr.gmi
+++ b/docs/installation-fr.gmi
@@ -1,13 +1,13 @@
# HtmGem, installation
-Pour faire fonctionner HtmGem — après avoir copié les fichiers — il ne reste qu’à ajouter une règle de ré-écriture d’URL (//URL Rewriting//).
+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//).
## 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 lire les pages Gemini
+* Module **mod-rewrite** pour prendre en charge les pages Gemini
## Installation
diff --git a/docs/presentation-fr.gmi b/docs/presentation-fr.gmi
deleted file mode 100644
index 8d04fab..0000000
--- a/docs/presentation-fr.gmi
+++ /dev/null
@@ -1,45 +0,0 @@
-# HtmGem, voir Gemini via le web
-
-HtmGem permet d’héberger des pages Gemini et de les publier sur un serveur web muni de **Php**. À l’ouverture d’une page ***.gmi**, il la traduit pour le navigateur web. Cette présente page est affichée de cette façon. Gemini utilise son propre protocole, format, clients et serveurs ; HtmGem permet d’en utiliser le format (Gemtext) via le web.
-
-```
-Gemini est un nouveau protocole internet qui :
-* est plus lourd que gopher,
-* est plus léger que le web,
-* n’en remplacera aucun,
-* vise le rapport puissance sur poids maximum,
-* prend la vie privée très sérieusement.
-```
-=> https://gemini.circumlunar.space/
-
-=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip Téléchargez la branche courante pour l’installer
-=> https://tildegit.org/Sbgodin/htmgem Code source, rapports de bug, commentaires…
-
-=> https://gmi.sbgodin.fr/htmgem Page principale de HtmGem via le web
-=> gemini://gmi.sbgodin.fr/htmgem Page principale de HtmGem via Gemini
-
-=> CHANGELOG.gmi Journal des modifications (//changelog//)
-=> COPYING.gmi GNU Affero General Public License (AGPLv3)
-
-Ceci est la page d’installation et de présentation d’**HtmGem**.
-=> docs/tutogemtext-fr.gmi Cliquez ici pour voir le tutoriel pour écrire des pages Gemini.
-
-=> docs/index-fr.gmi Installation
-# HtmGem, voir Gemini via le web
-
-HtmGem permet d’héberger des pages Gemini et de les publier sur un serveur web muni de **Php**. À l’ouverture d’une page ***.gmi**, il la traduit pour le navigateur web. Cette présente page est affichée de cette façon. Gemini utilise son propre protocole, format, clients et serveurs ; HtmGem permet d’en utiliser le format (Gemtext) via le web.
-
-
-=> https://tildegit.org/sbgodin/HtmGem/archive/master.zip Téléchargez la branche courante pour l’installer
-=> https://tildegit.org/Sbgodin/htmgem Code source, rapports de bug, commentaires…
-
-=> https://gmi.sbgodin.fr/htmgem Page principale de HtmGem via le web
-=> gemini://gmi.sbgodin.fr/htmgem Page principale de HtmGem via Gemini
-
-=> CHANGELOG.gmi Journal des modifications (//changelog//)
-=> COPYING.gmi GNU Affero General Public License (AGPLv3)
-
-Ceci est la page d’installation et de présentation d’**HtmGem**.
-=> docs/tutogemtext-fr.gmi Cliquez ici pour voir le tutoriel pour écrire des pages Gemini.
-
-=> docs/index-fr.gmi Installation
diff --git a/docs/tutogemtext-en.gmi b/docs/tutogemtext-en.gmi
new file mode 100644
index 0000000..163f169
--- /dev/null
+++ b/docs/tutogemtext-en.gmi
@@ -0,0 +1,74 @@
+# GemText tutorial
+
+Gemini is a protocol, a syntax, servers and clients. Its syntax is the GemText. Its principle is that it's the Gemini browser of the user which decides about the display. The font, the size, the page background, everything. One of the goal is to focus on the text and some other details explained below.
+
+The paragraph you just read is on one physical line, cut by the program you use in several logical lines to fit your screen. Between this text line and the preceding one, there's an empty line to mark the paragraph change.
+Here, I just did a line wrap. The margin should be lower, but it depends upon the program you are using.
+
+The titles of level one, two and three are first written as they are physically on this page, then on the line after they are displayed normally by the Gemini browser:
+
+# Title level 1
+# Title level 1
+
+## Title level 2
+## Title level 2
+
+### Title level 3
+### Title level 3
+
+# Citations
+
+> Text citation. The line can be as long as needed, it's your program that must cut the line to display it. One physical line can be long, but there's no need to wrap the line.
+> Text citation. The line can be as long as needed, it's your program that must cut the line to display it. One physical line can be long, but there's no need to wrap the line.
+
+# Preformated blocks
+
+```
+The preformated blocks are lines enclosed by ``` on one line before the block and a ``` after the block.
+```
+```
+The preformated blocks are lines enclosed by ``` on one line before the block and a ``` after the block.
+```
+
+# Unordered lists
+
+* The unordered lists are lines beginning by * one after the others.
+* They can be used to enumerate.
+* However, GemText doesn't recognize the ordered lists.
+* The unordered lists are lines beginning by * one after the others.
+* They can be used to enumerate.
+* However, GemText doesn't recognize the ordered lists.
+
+# The links
+
+There can be only one link on a line. And the line is dedicated to! Here's for instance a link to the site centralizing at the moment the information about Gemini:
+
+=> gemini://gemini.circumlunar.space/docs/specification.gmi Gemini specifications
+=> gemini://gemini.circumlunar.space/docs/specification.gmi Gemini specifications
+
+=> https://gemini.circumlunar.space/docs/specification.gmi
+=> https://gemini.circumlunar.space/docs/specification.gmi
+
+# Text decoration
+
+The text decoration is not part of Gemini's specifications.
+
+This **line** uses the //text decoration// which can ~~strike through~~ or __underline__ words.
+This **line** uses the //text decoration// which can ~~strike through~~ or __underline__ words.
+
+It's possible to disable and enable the text decoration with **^^^** on a line.
+
+And voilà! You know everything 🥳
+
+———————————————————— ————————————————————
+
+## HtmGem
+
+HtmGem allows to host Gemini pages and publish them on a web server with **Php**. When opening a page ***.gmi**, it translates it for the web browser. This page is displayed this way. It allows to use the Gemini syntax (GemText) on the web.
+=> https://gmi.sbgodin.fr/htmgem
+
+
+### 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
diff --git a/docs/tutogemtext-fr.gmi b/docs/tutogemtext-fr.gmi
index 5da5026..dd1c3e0 100644
--- a/docs/tutogemtext-fr.gmi
+++ b/docs/tutogemtext-fr.gmi
@@ -1,4 +1,4 @@
-# Tutorial GemText
+# Tutoriel GemText
Gemini est un protocole, une syntaxe, des serveurs et des clients. Sa syntaxe est le GemText. Son principe est que c’est le navigateur Gemeni de l’utilisateur qui décide de l‘affichage. La police de caractère, la taille, le fond d‘écran, tout. L’un des buts recherchés est de se concentrer sur le texte et quelques autres détails abordés ci-après.
@@ -24,10 +24,10 @@ Les titres de niveau un, deux puis trois sont d’abord écrits ci-après tel qu
# Blocs préformatés
```
-Les blocs préformatés sont des lignes encadrées par un ``` sur une ligne avant le bloc et un ``` après le bloc. Les lignes contenant ``` ne sont pas affichées :
+Les blocs préformatés sont des lignes encadrées par un ``` sur une ligne avant le bloc et un ``` après le bloc.
```
```
-Les blocs préformatés sont des lignes encadrées par un ``` sur une ligne avant le bloc et un ``` après le bloc. Les lignes contenant ``` ne sont pas affichées :
+Les blocs préformatés sont des lignes encadrées par un ``` sur une ligne avant le bloc et un ``` après le bloc.
```
# Listes non-ordonnées
@@ -58,7 +58,7 @@ Cette **ligne** utilise la //décoration du texte// qui peut ~~barrer~~ ou __sou
On peut désactiver et activer la décoration du texte avec **^^^** sur une ligne.
-Et voilà ! Vous savez tout ce qui est à savoir 🥳
+Et voilà ! Vous savez tout 🥳
———————————————————— ————————————————————
@@ -69,6 +69,6 @@ HtmGem permet d’héberger des pages Gemini et de les publier sur un serveur we
### License de cette page
-Cette page est sous licence libre **CC BY-SA 2.0 FR**.
-=> https://creativecommons.org/licenses/by-sa/2.0/fr/ Texte sous licence CC BY-SA 2.0 FR
+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
diff --git a/index-fr.gmi b/index-fr.gmi
deleted file mode 100644
index e4565cf..0000000
--- a/index-fr.gmi
+++ /dev/null
@@ -1,22 +0,0 @@
-# HtmGem, voir Gemini via le web
-
-HtmGem rend vos pages **Gemini** accessibles sur le web. Il fonctionne aussi sur un hébergement mutualisé.
-
-# Installation
-* Copier les fichiers.
-* Configurer la réécriture d’url.
-
-=> docs/index-fr.gmi Installer HtmGem
-
-# Gemini…
-Gemini est un protocole, une syntaxe, des serveurs et des clients. C’est le même principe que le web, en plus rudimentaire et stable. Sa syntaxe est le **GemText**. Son principe est que c’est le navigateur Gemini de l’utilisateur qui décide de l‘affichage. La police de caractère, la taille, le fond d‘écran, tout.
-
-=> docs/tutogemtext-fr.gmi Tutoriel **Gemtext** et exemples
-
-
-———————————————————— ————————————————————
-=> https://gmi.sbgodin.fr/htmgem Page principale du projet
-=> https://tildegit.org/Sbgodin/htmgem Code source, commentaires
-=> https://gemini.circumlunar.space Capsule principale Gemini
-=> CHANGELOG.gmi Journal des modifications
-=> COPYING.gmi Licence Gnu Affero General Public License v3 — 19 november 2007
diff --git a/index.gmi b/index.gmi
index 688200f..070df28 100644
--- a/index.gmi
+++ b/index.gmi
@@ -1,8 +1,13 @@
# HtmGem
+=> 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
-=> index-fr.gmi **Français**
-HtmGem rend vos pages **Gemini** accessibles sur le web. Il fonctionne aussi sur un hébergement mutualisé.
-
-=/> **English**
+=> 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/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.