Advanced configuration

❗️ This page works with URL rewriting enabled ❗️

 

By default, the same style is used for all the pages, htmgem/css/htmgem.css, except when a file having the same name as the page but with the extension .css exists in the same directory. In such as case, it's used.

 

When the CSS option is activated in the configuration (see /rewrite below) other behaviors are possible. Beware, it won't work with a Gemini client as HtmGem is only reachable with a web browser.

 

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:

Shows the readable source code on the screen, using the markup <pre>.

configuration-en.gmi | source : Downloads the source code.

 

With style already included…

 

Style HtmGem, the default style

Style none

Style terminal

Style black wide

Style simple

Style raw

Style debug

 

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:

&textDecoration=0

 

BNF / Syntax

 

HtmGem uses a precise implementation of the GemText BNF. It indicates exactly what text portions are to be used.

BNF

 

How to build GemText pages?

 

———————————————————— ————————————————————

 

Amongst the distributed files and directories, only the ones below are useful for HtmGem:

The others can be deleted (included this present file configuration-en.gmi) although they are not harmful.