Fix informations
parent
336030722f
commit
719fd6693e
|
@ -1,3 +1,4 @@
|
|||
deploy*
|
||||
/gemini
|
||||
/public
|
||||
*.lock
|
||||
|
|
|
@ -18,8 +18,8 @@ correspondantes par le biais du parefeu Packet Filter, sous OpenBSD.
|
|||
|
||||
Le service inetd est chargé de l'écoute active.
|
||||
|
||||
- Auteure : Solène Rapenne
|
||||
- URL : https://tildegit.org/solene/iblock.git
|
||||
- Auteure du projet : Solène Rapenne
|
||||
- URL du dépôt Git : https://tildegit.org/solene/iblock.git
|
||||
- liste d'URL bannies : http://perso.pw/blocklist.txt
|
||||
|
||||
## Installation
|
||||
|
|
|
@ -21,38 +21,25 @@ ce service. Puis nous verrons comment configurer **relayd** ou **nginx**
|
|||
en tant que proxy relais ; et nous finirons par quelques règles pour
|
||||
Packet-Filter.
|
||||
|
||||
---
|
||||
|
||||
- Auteure du projet **V'Ger** : Solène Rapenne
|
||||
- URL : https://tildegit.org/solene/vger
|
||||
- Disponible en tant que paquet : https://openports.pl/path/net/vger
|
||||
- URL du dépôt Git : https://tildegit.org/solene/vger
|
||||
|
||||
## Installation
|
||||
|
||||
Commençons par la copie du dépôt Git :
|
||||
Puisque V'Ger est disponible dans les ports, l'utilisation de l'outil
|
||||
`pkg_add` suffit :
|
||||
|
||||
```sh
|
||||
$ git clone https://tildegit.org/solene/vger.git
|
||||
$ cd vger
|
||||
$ doas pkg_add vger
|
||||
```
|
||||
|
||||
Compilons le binaire - *OpenBSD renferme nativement les outils adéquats* - :
|
||||
---
|
||||
|
||||
```sh
|
||||
$ make
|
||||
cc -O2 -pipe -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -c main.c
|
||||
cc -O2 -pipe -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -c mimes.c
|
||||
cc -O2 -pipe -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -c utils.c
|
||||
cc -O2 -pipe -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -o vger main.o mimes.o utils.o
|
||||
```
|
||||
*Si la phase de compilation s'exécute mal, contactez Solène !*
|
||||
|
||||
Puis installons le binaire :
|
||||
```sh
|
||||
$ doas make install
|
||||
install -o root -g wheel vger /usr/local//bin/
|
||||
install -o root -g wheel vger.8 /usr/local//man/man8/
|
||||
```
|
||||
|
||||
Passons maintenant à la phase de configuration !
|
||||
*Autrement vous pouvez toujours l'installer depuis le dépôt Git… mais là,
|
||||
je vous renvoie à la documention du dépôt*.
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
@ -217,27 +217,31 @@ modifier, ajouter votre code Hugo, pour générer plus proprement afin de
|
|||
débarrasser du code Markdown, par exemple :
|
||||
|
||||
```hugo
|
||||
{{ $scratch := newScratch }}
|
||||
{{ $content := .RawContent -}}
|
||||
{{ $content := $content | replaceRE "`(.+)`" "$1" -}}
|
||||
{{ $content := $content | replaceRE "`" "```" -}}
|
||||
{{ $content := $content | replaceRE "\\*(.+)\\*" "$1" -}}
|
||||
{{ $content := $content | replaceRE "(?ms)\\*\\*(.+)\\*\\*" "$1" -}}
|
||||
{{ $content := $content | replaceRE "\\[(.+)\\]: (.+)" "=> $2 $1" -}}
|
||||
{{ $content := $content | replaceRE " \\[(.+)\\]\\((.+)\\)" "\n\n=> $2 $1\n\n" -}}
|
||||
{{ $content := $content | replaceRE "\\[(.+)\\]\\((.+)\\)" "=> $2 $1" -}}
|
||||
{{ $content := $content | replaceRE "<br>" "" -}}
|
||||
{{ $content }}
|
||||
{{ $content := $content | replaceRE `#### ` "### " -}}
|
||||
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
|
||||
{{ $content := $content | replaceRE `\n(\d+). (.+?)` "\n* $2" -}}
|
||||
{{ $content := $content | replaceRE `\[\^(.+?)\]:?` "" -}}
|
||||
{{ $content := $content | replaceRE `<br/??>` "\n" -}}
|
||||
{{ $content := $content | replaceRE `<a .*href="(.+?)".*>(.+?)</a>` "[$2]($1)" -}}
|
||||
{{ $content := $content | replaceRE `\sgemini://(\S*)` " [gemini://$1](gemini://$1)" -}}
|
||||
{{ $content := $content | replaceRE "([^`])<.*?>([^`])" "$1$2" -}}
|
||||
{{ $content := $content | replaceRE `\n\n!\[.*\]\((.+?) \"(.+?)\"\)` "\n\n=> $1 Image: $2" -}}
|
||||
{{ $content := $content | replaceRE `\n\n!\[.*]\((.+?)\)` "\n\n=> $1 Embedded Image: $1" -}}
|
||||
{{ $links := findRE `\n=> ` $content }}{{ $scratch.Set "ref" (add (len $links) 1) }}
|
||||
{{ $refs := findRE `\[.+?\]\(.+?\)` $content }}
|
||||
{{ $scratch.Set "content" $content }}{{ range $refs }}{{ $ref := $scratch.Get "ref" }}{{ $contentInLoop := $scratch.Get "content" }}{{ $url := (printf "%s #%d" . $ref) }}{{ $contentInLoop := replace $contentInLoop . $url -}}{{ $scratch.Set "content" $contentInLoop }}{{ $scratch.Set "ref" (add $ref 1) }}{{ end }}{{ $content := $scratch.Get "content" | replaceRE `\[(.+?)\]\((.+?)\) #(\d+)` "$1 [$3]" -}}
|
||||
{{ $content | safeHTML }}
|
||||
```
|
||||
|
||||
**Explications :**
|
||||
|
||||
- les lignes 2 et 3 enlevent le code inline ; **la 3ème ligne semble ne pas fonctionner correctement !**
|
||||
- la ligne 3 supprime le code italique - **semble ne pas fonctionner correctement**.
|
||||
- la ligne 4 supprime le code bold en essayant sur de multiples lignes
|
||||
- les lignes 5 à 7 transforment les liens
|
||||
- la 8ème ligne supprime le code HTML de renvoi à la ligne.
|
||||
|
||||
*Ensuite, à vous d'être inventif…*
|
||||
*Ce code - qui fait très bien son travail - est un copié-collé du code créé par un certain
|
||||
[Wouter Groeneveld](https://brainbaking.com/post/2021/04/using-hugo-to-launch-a-gemini-capsule/) ;
|
||||
les explications sont fournies en anglais. N'ayant pas l'utilité de gérer
|
||||
des fichiers audio, vidéo, localement ou sur d'autres plateformes, j'ai
|
||||
simplement supprimé les lignes correspondantes.*
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in New Issue