README en FR + old English + fix edit OPT
This commit is contained in:
parent
f89a3fb8e8
commit
69a3c273fa
|
@ -0,0 +1,299 @@
|
||||||
|
# GSL: Statique Littérateur
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
GSL is a multiple blogs/websites generator based on their domain,
|
||||||
|
written in bash, for minimal dependancies. The websites are nearly all
|
||||||
|
static, except for some includes pages, like listing posts, that nginx
|
||||||
|
can easily get, in your webserver.
|
||||||
|
|
||||||
|
# Dependancies
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- bash
|
||||||
|
- coreutils
|
||||||
|
- curl (to check Posts links response)
|
||||||
|
- rsync
|
||||||
|
|
||||||
|
|
||||||
|
# GSL: Installation
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
In your System /
|
||||||
|
```
|
||||||
|
git clone URL .
|
||||||
|
```
|
||||||
|
|
||||||
|
GSL does NOT use any sudo. To avoid errors, you must give permissions
|
||||||
|
to USER with chown -R to folders.
|
||||||
|
|
||||||
|
## --Prefix for DOMAIN configuration (set according to user choice):
|
||||||
|
- HOME: ~/.config/gsl
|
||||||
|
- GLOBAL: /var/lib/gsl
|
||||||
|
- Folder: --Prefix/domains/ (created with $ gsl new)
|
||||||
|
|
||||||
|
### DOMAIN Datas from Prefix:
|
||||||
|
- Folder: --Prefix/DOMAIN/ (Created by GSL)
|
||||||
|
- - Files: DOMAIN.conf, authors.db (Created by GSL)
|
||||||
|
- - Folder: --Prefix/DOMAIN/templates/ (css, logos...) (Created by GSL)
|
||||||
|
|
||||||
|
## Destination Folder: /etc/gsl/
|
||||||
|
- File: gsl.conf
|
||||||
|
|
||||||
|
## Destination Folder: /var/lib/gsl/
|
||||||
|
- Folder: db (Created by GSL)
|
||||||
|
- Folder: helps
|
||||||
|
- Folder: scripts
|
||||||
|
- File: README.md
|
||||||
|
|
||||||
|
## Destination Folder: /var/log/gsl
|
||||||
|
- File: gsl.log (Created and managed by GSL $ gsl log clean...)
|
||||||
|
|
||||||
|
## Destination Folder: /usr/local/bin
|
||||||
|
- File: gsl
|
||||||
|
|
||||||
|
## Destination Folder: /usr/share/bash-completion/completions/gsl
|
||||||
|
- File: gsl
|
||||||
|
|
||||||
|
# How to configure a DOMAIN folder, and create a Post
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
When Adding a DOMAIN (example.com), GSL will ask you some questions.
|
||||||
|
Datas will be used to create a DOMAIN.conf file. GSL will also ask you
|
||||||
|
to set a folder where you will put your Posts, but you can create or add
|
||||||
|
ones too.
|
||||||
|
|
||||||
|
## Set a DOMAIN
|
||||||
|
- add a DOMAIN name (if not alrady done)
|
||||||
|
```
|
||||||
|
gsl new
|
||||||
|
```
|
||||||
|
|
||||||
|
Follow instructions when adding DOMAIN or see them again with
|
||||||
|
```
|
||||||
|
gsl help new
|
||||||
|
gsl help install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Set a DOMAIN folder for Posts (if not already done by GSL or You)
|
||||||
|
|
||||||
|
- Add/Create or go into your folder of choice
|
||||||
|
- Save into that folder a blank file named gsl.DOMAIN (gsl.example.org)
|
||||||
|
so that GSL, knows this folder is for this DOMAIN website.
|
||||||
|
|
||||||
|
## Create a new Post
|
||||||
|
The engine is written from scratch and looks like a mix of markdown and
|
||||||
|
ReStructuredText. It's very easy to learn and use.
|
||||||
|
|
||||||
|
- Write a post in a file, using some "metas" that GSL will catch.
|
||||||
|
- Save your file with .gsl extension
|
||||||
|
- Start checking it, using:
|
||||||
|
|
||||||
|
```
|
||||||
|
gsl check
|
||||||
|
```
|
||||||
|
|
||||||
|
## Convert one or all Posts
|
||||||
|
If your Post has no error, you will have to deploy html
|
||||||
|
files and folders. You could install nginx, or lightweight darkhttpd
|
||||||
|
webserver on your PC to preview the website. You can also just open
|
||||||
|
index.html in your server folder, but you won't be able to see some extra
|
||||||
|
includes page, like Posts listing.
|
||||||
|
|
||||||
|
To convert your Posts in HTML, use
|
||||||
|
|
||||||
|
```
|
||||||
|
gsl make
|
||||||
|
```
|
||||||
|
|
||||||
|
You can select a specific post, with autocompletion to check and make
|
||||||
|
only that specified one.
|
||||||
|
|
||||||
|
# Create a Templates
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
You will have to create some CSS (styles.css) in your /DOMAIN/templates/
|
||||||
|
- HOME: ~/.config/gsl/domains/DOMAIN/templates/
|
||||||
|
- GLOBAL: /var/lib/gsl/domains/DOMAIN/templates/
|
||||||
|
|
||||||
|
# How to Write a Post
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Post has 2 sections : Before and After #1. #1 is the FIRST Title of your
|
||||||
|
post. #(1-6) are HTML titles.
|
||||||
|
- Before #1 is used to set METAs HEADERS to configure your Post.
|
||||||
|
- From #1 is the CONTENT of your Post
|
||||||
|
|
||||||
|
## NEEDED HEADERS (before #1)
|
||||||
|
Register METAs for HTML Page content
|
||||||
|
|
||||||
|
```
|
||||||
|
title: POST TITLE
|
||||||
|
slug: POST-TITLE (if space in slug GSL will convert them)
|
||||||
|
info: DESCRIPTION (about the Post)
|
||||||
|
author: NAME (must be registred ($ gsl author add)
|
||||||
|
date: YYYY-MM-DD
|
||||||
|
tags: TAG1,OTHER TAG2,TAG3 (comma separated)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Admin Header
|
||||||
|
Admin can define specific type of content. If no type defined, GSL will
|
||||||
|
add at first line the default value: "type: post".
|
||||||
|
|
||||||
|
TYPE:
|
||||||
|
- post < classic content
|
||||||
|
- page < used to define main index, 404, about...
|
||||||
|
|
||||||
|
```
|
||||||
|
type: TYPE
|
||||||
|
```
|
||||||
|
|
||||||
|
GSL will create html file according to slug. Do not add .html to slug.
|
||||||
|
- post < /slug/index.html
|
||||||
|
- page < /slug.html
|
||||||
|
|
||||||
|
## Optional HEADERS (before #1)
|
||||||
|
Register METAs for CONTENT. " : " field separator
|
||||||
|
|
||||||
|
```
|
||||||
|
abbr: SHORT : LONG
|
||||||
|
file: NAME : FILENAME : Alt Text
|
||||||
|
link: NAME : URL : Alt Text
|
||||||
|
code: NBR : FILENAME : Alt Text
|
||||||
|
image: NBR : FILENAME : ALT-TEXT
|
||||||
|
```
|
||||||
|
|
||||||
|
## CONTENT Post:
|
||||||
|
In Content Post, markers (i.e. __My Great file) must be on the SAME line.
|
||||||
|
For ABBRs, just write SHORT in your content
|
||||||
|
|
||||||
|
```
|
||||||
|
# Paragraphs
|
||||||
|
At begining of new line, open with ( and close with )
|
||||||
|
Set till 3 different classes with ( 1 ( 2 ( 3
|
||||||
|
( 2
|
||||||
|
This is a paragraph with class 2
|
||||||
|
)
|
||||||
|
|
||||||
|
# Register in Header. link: My Great Link : URL : Alt text
|
||||||
|
_My Great Link
|
||||||
|
_My Great Link+ # Open in new tab
|
||||||
|
|
||||||
|
# Register in Header. file: My Great file : FILENAME : ALT-TEXT
|
||||||
|
__My Great file
|
||||||
|
|
||||||
|
# Register in Header. image: 1 : FILENAME : ALT-TEXT
|
||||||
|
_image:1:[OPT l|r|c (left, right, center, alignment)]
|
||||||
|
_image:1:r
|
||||||
|
|
||||||
|
# Block-Code File: Register in Header. code: 1 : FILENAME : Alt Text
|
||||||
|
_code:1
|
||||||
|
|
||||||
|
# Write in STRONG
|
||||||
|
**this strong content**
|
||||||
|
this un**believe**able content
|
||||||
|
this border**line** content
|
||||||
|
|
||||||
|
# BOLD
|
||||||
|
*this bold content*
|
||||||
|
...
|
||||||
|
|
||||||
|
# Write in ITALIC
|
||||||
|
/this em text/
|
||||||
|
|
||||||
|
# Inline-code (¤ = alt-gr + $ on FR keyboard)
|
||||||
|
¤push()¤
|
||||||
|
|
||||||
|
# Simple Blockquote: Use 3 "-"
|
||||||
|
---
|
||||||
|
(
|
||||||
|
A simple great quote
|
||||||
|
)
|
||||||
|
---
|
||||||
|
|
||||||
|
# Advanced Blockquote
|
||||||
|
---
|
||||||
|
_cite : Richard Matthew Stallman
|
||||||
|
_link : https://stallman.org/
|
||||||
|
_lang : en
|
||||||
|
(
|
||||||
|
In the free/libre software movement, we develop software that respects
|
||||||
|
users' freedom, so we and you can escape from software that doesn't. I
|
||||||
|
could have made money this way, and perhaps amused myself writing code.
|
||||||
|
But I knew that at the end of my career, I would look back on years of
|
||||||
|
building walls to divide people, and feel I had spent my life making the
|
||||||
|
world a worse place
|
||||||
|
)
|
||||||
|
---
|
||||||
|
|
||||||
|
# For advanced blockquotes, you can also add, if known:
|
||||||
|
_year: 2021
|
||||||
|
_book: Esperanza 64
|
||||||
|
|
||||||
|
# Create Lists
|
||||||
|
Use = to create an item. You can use infinite sub-items, but each Item
|
||||||
|
of a list MUST be on the same Line
|
||||||
|
(
|
||||||
|
Let's start a list
|
||||||
|
= Item 1 is *great*
|
||||||
|
== sub-item 1
|
||||||
|
== sub-item 2
|
||||||
|
=== sub-sub-item 1 of sub-item 2
|
||||||
|
== sub-item 3
|
||||||
|
= Item 2
|
||||||
|
== sub-item 1 of Item 2
|
||||||
|
This list is ended
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
# HELP COMMAND
|
||||||
|
```
|
||||||
|
$ gsl [ARG]
|
||||||
|
readme : Show README.md instructions
|
||||||
|
help | -h [OPT] : This Help
|
||||||
|
install : Show process installation
|
||||||
|
new : Adding a DOMAIN
|
||||||
|
write | -w : How to write a Post
|
||||||
|
|
||||||
|
new | -N : Add and configure a new DOMAIN
|
||||||
|
|
||||||
|
log | -L [OPTS] : Show logs from all sessions
|
||||||
|
clean | -C : Logs saved to {DATE}.gsl.log and cleaned
|
||||||
|
-i | -w | -e : from levels (infos, warnings, errors)
|
||||||
|
-s : from last session only
|
||||||
|
[TERM] : [TERM] : case insensitive, regex 'T1.*T2'
|
||||||
|
(i.e. $ gsl log -e -s code)
|
||||||
|
|
||||||
|
author | -A [OPT] : List authors from DOMAIN set in PWD folder
|
||||||
|
add : Add author(s) for DOMAIN
|
||||||
|
remove : Remove author(s) for DOMAIN
|
||||||
|
|
||||||
|
edit | -E [FILE] : Open in default EDITOR [FILE] or with nano
|
||||||
|
db [FILE] : Show DB statuses from [FILE]
|
||||||
|
|
||||||
|
sync [OPT] : Sync Templates to www and wip
|
||||||
|
wip : Only to wip server (also done with make)
|
||||||
|
www : Only to www server (also done with www)
|
||||||
|
|
||||||
|
|
||||||
|
check | -C [OPT] [FILE] : Check Posts errors from PWD folder or [FILE]
|
||||||
|
-F : Force check again
|
||||||
|
|
||||||
|
make | -M [OPT] [FILE] : Convert Posts from PWD folder or [FILE]
|
||||||
|
to HTML file in server
|
||||||
|
-F : Force Make again
|
||||||
|
|
||||||
|
post-list [OPT] [FILE] : Add post again from [FILE] to Last-Posts List
|
||||||
|
(When converting new post, it will be added)
|
||||||
|
Pin : Set Post from [FILE] to first in Last-Posts List
|
||||||
|
Add : Add Post from [FILE] to last in Last-Posts List
|
||||||
|
|
||||||
|
www [OPT1] [OPT2] : Add/Remove Post from www server
|
||||||
|
[OPT1]:
|
||||||
|
add : Add all/[FILE] to www server
|
||||||
|
rmove : remove all/[FILE] from www server
|
||||||
|
[OPT2]:
|
||||||
|
all : Select all post with wip statuses
|
||||||
|
[FILE] : Select specific post (if wip status)
|
||||||
|
|
||||||
|
version | -v : Show local versionn
|
||||||
|
-vv : Shown local and repo Versions
|
||||||
|
```
|
299
README.md
299
README.md
|
@ -1,12 +1,13 @@
|
||||||
# GSL: Statique Littérateur
|
# GSL: Statique Littérateur
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
GSL is a multiple blogs/websites generator based on their domain,
|
GSL est un générateur de blogs/sites-web basé sur leur nom de domaine,
|
||||||
written in bash, for minimal dependancies. The websites are nearly all
|
écrit en bash, afin de ne réduire ses dépendances au minimum. Les pages
|
||||||
static, except for some includes pages, like listing posts, that nginx
|
générées sont presque entièrement statiques, à l'exception du module de
|
||||||
can easily get, in your webserver.
|
liste des derniers articles. Nginx peut être facilement configuré pour
|
||||||
|
interprêter ce module.
|
||||||
|
|
||||||
# Dependancies
|
# Dépendances
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
- bash
|
- bash
|
||||||
|
@ -17,199 +18,232 @@ can easily get, in your webserver.
|
||||||
|
|
||||||
# GSL: Installation
|
# GSL: Installation
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
In your System /
|
Une procédure d'installation via un setup est en cours de test. Il est
|
||||||
```
|
aussi possible et recommandé sous debian de l'installer grâce à son
|
||||||
git clone URL .
|
paquet deb.
|
||||||
```
|
|
||||||
|
|
||||||
GSL does NOT use any sudo. To avoid errors, you must give permissions
|
Pour une installation manuelle, clonez ce dépôt, et copiez les dossiers
|
||||||
to USER with chown -R to folders.
|
déjà pré-établis dans le système. GSL n'utilise pas sudo, il vous faut
|
||||||
|
donc donner les droits aux dossiers (chown -R) à l'utilisateur
|
||||||
|
(sauf au dossier /usr/local/bin). Pour ce dossier, vous donnerez les droits
|
||||||
|
via chown USER:USER /usr/local/bin/gsl
|
||||||
|
|
||||||
## --Prefix for DOMAIN configuration (set according to user choice):
|
## Configuration du DOMAIN (selon le choix de l'utilistaeur via $ gsl new) :
|
||||||
- HOME: ~/.config/gsl
|
- HOME: ~/.config/gsl
|
||||||
- GLOBAL: /var/lib/gsl
|
- GLOBAL: /var/lib/gsl
|
||||||
- Folder: --Prefix/domains/ (created with $ gsl new)
|
- Dossier: --Prefix/domains/ (créé par GSL via $ gsl new)
|
||||||
|
|
||||||
### DOMAIN Datas from Prefix:
|
### Données du DOMAIN :
|
||||||
- Folder: --Prefix/DOMAIN/ (Created by GSL)
|
- Dossier: --Prefix/DOMAIN/ (créé par GSL)
|
||||||
- - Files: DOMAIN.conf, authors.db (Created by GSL)
|
- - Fichiers: DOMAIN.conf, authors.db (créé par GSL)
|
||||||
- - Folder: --Prefix/DOMAIN/templates/ (css, logos...) (Created by GSL)
|
- - Dossier: --Prefix/DOMAIN/templates/ (créé par GSL - pour vos css, logos...)
|
||||||
|
|
||||||
## Destination Folder: /etc/gsl/
|
## Dossier de configuration de GSL : /etc/gsl/
|
||||||
- File: gsl.conf
|
- Fichier: gsl.conf
|
||||||
|
|
||||||
## Destination Folder: /var/lib/gsl/
|
## Dossier principal : /var/lib/gsl/
|
||||||
- Folder: db (Created by GSL)
|
- Folder: db (créé par GSL)
|
||||||
- Folder: helps
|
- Dossier: helps
|
||||||
- Folder: scripts
|
- Dossier: scripts
|
||||||
- File: README.md
|
- Fichier: README.md, README-english.md
|
||||||
|
|
||||||
## Destination Folder: /var/log/gsl
|
## Dossier des logs: /var/log/gsl/
|
||||||
- File: gsl.log (Created and managed by GSL $ gsl log clean...)
|
- Fichier: gsl.log (créé et géré par GSL via $ gsl log [OPT]...)
|
||||||
|
|
||||||
## Destination Folder: /usr/local/bin
|
## Dossier de l'éxécutable : /usr/local/bin/
|
||||||
- File: gsl
|
- Fichier: gsl
|
||||||
|
|
||||||
## Destination Folder: /usr/share/bash-completion/completions/gsl
|
## Dossier d'autocomplétion : /usr/share/bash-completion/completions/gsl/
|
||||||
- File: gsl
|
- Fichier: gsl
|
||||||
|
|
||||||
# How to configure a DOMAIN folder, and create a Post
|
# Comment configurer un domaine
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
When Adding a DOMAIN (example.com), GSL will ask you some questions.
|
Des questions vous seront posées lorsque vous voudrez ajouter un domaine
|
||||||
Datas will be used to create a DOMAIN.conf file. GSL will also ask you
|
(exemple.com). Les données renseignées seront utilisées pour créer le
|
||||||
to set a folder where you will put your Posts, but you can create or add
|
fichier DOMAIN.conf. Une question spécifique pour les fichier des articles
|
||||||
ones too.
|
vous sera posée afin d'établir un dossier de stockage de vos articles.
|
||||||
|
Vous pourrez en créer à loisir autant que vous voulez plus tard.
|
||||||
|
|
||||||
## Set a DOMAIN
|
|
||||||
- add a DOMAIN name (if not alrady done)
|
|
||||||
```
|
```
|
||||||
|
# helps
|
||||||
|
gsl help
|
||||||
|
gsl help new
|
||||||
|
gsl help install
|
||||||
|
|
||||||
|
# Ajouter un domaine
|
||||||
gsl new
|
gsl new
|
||||||
```
|
```
|
||||||
|
|
||||||
Follow instructions when adding DOMAIN or see them again with
|
## Définir un dossier pour les articles du DOMAIN
|
||||||
|
Si ce n'est pas déjà fait par GSL, ou que vous voulez ajouter un dossier
|
||||||
|
pour y stocker et convertir en HTML vos articles pour un DOMAIN prévis :
|
||||||
|
|
||||||
|
- Ajouter/créer un dossier de votre choix
|
||||||
|
- Créer un fichier vide nommé gsl.DOMAIAN (gsl.exemple.com)
|
||||||
|
|
||||||
|
## Ajouter un auteur
|
||||||
```
|
```
|
||||||
gsl help new
|
cd MON-DOSSER-ARTICLES
|
||||||
gsl help install
|
gsl author add
|
||||||
```
|
```
|
||||||
|
|
||||||
## Set a DOMAIN folder for Posts (if not already done by GSL or You)
|
## Créer un article
|
||||||
|
Le moteur de convertion est nouveau, et est un mélange entre markdown et
|
||||||
|
reSTructuredText. Il est simple à apprendre et à utiliser.
|
||||||
|
|
||||||
- Add/Create or go into your folder of choice
|
- Créer un fichier (monarticle).gsl (extension .gsl)
|
||||||
- Save into that folder a blank file named gsl.DOMAIN (gsl.example.org)
|
- Suivez le guide plus bas pour comprendre les notions
|
||||||
so that GSL, knows this folder is for this DOMAIN website.
|
|
||||||
|
|
||||||
## Create a new Post
|
|
||||||
The engine is written from scratch and looks like a mix of markdown and
|
|
||||||
ReStructuredText. It's very easy to learn and use.
|
|
||||||
|
|
||||||
- Write a post in a file, using some "metas" that GSL will catch.
|
|
||||||
- Save your file with .gsl extension
|
|
||||||
- Start checking it, using:
|
|
||||||
|
|
||||||
|
Vous devrez le faire valider par GSL :
|
||||||
```
|
```
|
||||||
gsl check
|
gsl check
|
||||||
```
|
```
|
||||||
|
|
||||||
## Convert one or all Posts
|
## Convertir un ou tous les articles
|
||||||
If your Post has no error, you will have to deploy html
|
Si votre article n'a pas d'erreurs, vous pouvez le convertir en HTML.
|
||||||
files and folders. You could install nginx, or lightweight darkhttpd
|
|
||||||
webserver on your PC to preview the website. You can also just open
|
|
||||||
index.html in your server folder, but you won't be able to see some extra
|
|
||||||
includes page, like Posts listing.
|
|
||||||
|
|
||||||
To convert your Posts in HTML, use
|
|
||||||
|
|
||||||
```
|
```
|
||||||
gsl make
|
gsl make
|
||||||
```
|
```
|
||||||
|
|
||||||
You can select a specific post, with autocompletion to check and make
|
Votre article sera prêt dans le dossier webserver (ex: /var/www/DOMAIN/wip)
|
||||||
only that specified one.
|
Vous pourrez donc vérifier son rendu.
|
||||||
|
|
||||||
# Create a Templates
|
Si vous êtes satisfait, vous pouvez le déployer "officiellement" dans www
|
||||||
|
|
||||||
|
```
|
||||||
|
# Vous pouvez utiliser l'autocompletion pour les articles
|
||||||
|
gsl www add (monarticle.gsl)
|
||||||
|
```
|
||||||
|
|
||||||
|
# Créer un Template
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
You will have to create some CSS (styles.css) in your /DOMAIN/templates/
|
Vous devrez pour que votre site soit à vôtre goût créer et définir les
|
||||||
|
styles dans styles.css. Placez ce fichier (en fonction du choix de votre
|
||||||
|
configuration du DOMAIN) dans :
|
||||||
- HOME: ~/.config/gsl/domains/DOMAIN/templates/
|
- HOME: ~/.config/gsl/domains/DOMAIN/templates/
|
||||||
- GLOBAL: /var/lib/gsl/domains/DOMAIN/templates/
|
- GLOBAL: /var/lib/gsl/domains/DOMAIN/templates/
|
||||||
|
|
||||||
# How to Write a Post
|
Astuce: Une fois votre article créé, vous verrez dans sa source que
|
||||||
|
beaucoup d'éléments ont une class="acronymechoisi_***". Utilisez ces classes.
|
||||||
|
Pour mettre à jour et voir vos modifications
|
||||||
|
|
||||||
|
```
|
||||||
|
gsl sync
|
||||||
|
# ou (si vous modifier le header/footer)
|
||||||
|
gsl make -F
|
||||||
|
```
|
||||||
|
|
||||||
|
# Comment écrire un article
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
Post has 2 sections : Before and After #1. #1 is the FIRST Title of your
|
Votre article doit contenir 2 sections. Les Metas avant #1 et
|
||||||
post. #(1-6) are HTML titles.
|
l'article à partir de ce repère (servant de titre h1).
|
||||||
- Before #1 is used to set METAs HEADERS to configure your Post.
|
|
||||||
- From #1 is the CONTENT of your Post
|
- METAS : configurer votre article (titre, date, liens...)
|
||||||
|
- ARTICLE : Contenue rédactionnel avec quelques marqueurs (gras...)
|
||||||
|
|
||||||
|
## METAS obligatoires (avant #1)
|
||||||
|
|
||||||
## NEEDED HEADERS (before #1)
|
|
||||||
Register METAs for HTML Page content
|
|
||||||
|
|
||||||
```
|
```
|
||||||
title: POST TITLE
|
title: POST TITLE
|
||||||
slug: POST-TITLE (if space in slug GSL will convert them)
|
slug: POST-TITLE (si espaces, GSL les convertira en -)
|
||||||
info: DESCRIPTION (about the Post)
|
info: DESCRIPTION (À propos de cet article)
|
||||||
author: NAME (must be registred ($ gsl author add)
|
author: NAME (doit être enregistré via ($ gsl author add)
|
||||||
date: YYYY-MM-DD
|
date: YYYY-MM-DD
|
||||||
tags: TAG1,OTHER TAG2,TAG3 (comma separated)
|
tags: TAG1,Mon TAG2,TAG3 (séparé par une virgule)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Admin Header
|
### Page ou Article ?
|
||||||
Admin can define specific type of content. If no type defined, GSL will
|
Vous pouvez spécifiez pour chaque article si c'est une page ou un article
|
||||||
add at first line the default value: "type: post".
|
Si non renseigné, GSL ajoutera le type: post (article) par défaut à la
|
||||||
|
première ligne de votre article
|
||||||
|
|
||||||
TYPE:
|
TYPE:
|
||||||
- post < classic content
|
- post < Article
|
||||||
- page < used to define main index, 404, about...
|
- page < Page (créer vos pages: index, 404, about...)
|
||||||
|
|
||||||
```
|
```
|
||||||
type: TYPE
|
type: TYPE
|
||||||
```
|
```
|
||||||
|
|
||||||
GSL will create html file according to slug. Do not add .html to slug.
|
GSL créera vos fichier HTML selon le "slug" renseigné. Ne pas ajouter .html
|
||||||
- post < /slug/index.html
|
Selon le type:
|
||||||
- page < /slug.html
|
|
||||||
|
|
||||||
## Optional HEADERS (before #1)
|
- post < /POST-TITLE/index.html
|
||||||
Register METAs for CONTENT. " : " field separator
|
- page < /POST-TITLE.html
|
||||||
|
|
||||||
|
## METAS optionnelles (avant #1)
|
||||||
|
Définir les marqueurs (abbr:, link:...) et utilisr " : " comme séparateur
|
||||||
|
|
||||||
```
|
```
|
||||||
abbr: SHORT : LONG
|
abbr: COURT : LONG
|
||||||
file: NAME : FILENAME : Alt Text
|
file: NOM : NOM-DU-FICHIER : Text alternatif
|
||||||
link: NAME : URL : Alt Text
|
link: NOM : URL : Text alternatif
|
||||||
code: NBR : FILENAME : Alt Text
|
code: NUMERO : NOM-DU-FICHIER : Text alternatif
|
||||||
image: NBR : FILENAME : ALT-TEXT
|
image: NUMERO : NOM-DU-FICHIER : TEXT-ALTERNATIF
|
||||||
```
|
```
|
||||||
|
|
||||||
## CONTENT Post:
|
## Contenu de l'article:
|
||||||
In Content Post, markers (i.e. __My Great file) must be on the SAME line.
|
Les marqueurs (ex __Mon-super-fichier) doivent commencer et finir sur
|
||||||
For ABBRs, just write SHORT in your content
|
la même ligne. Pour les abréviations (abbr:), écrivez juste (ex: COURT).
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
# Paragraphs
|
# Paragraphes
|
||||||
At begining of new line, open with ( and close with )
|
Au début d'une nouvelle ligne, ouvrez avec ( et fermez avec ).
|
||||||
Set till 3 different classes with ( 1 ( 2 ( 3
|
Vous pouvez utiliser 4 classes de paragraphes différentes : ( 1 ( 2 ( 3
|
||||||
( 2
|
( 2
|
||||||
This is a paragraph with class 2
|
Paragraphe avec une classe 2 (css)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Register in Header. link: My Great Link : URL : Alt text
|
# Liens
|
||||||
_My Great Link
|
(définir en METAS. ex: link: Mon lien : URL : Alt text)
|
||||||
_My Great Link+ # Open in new tab
|
_Mon lien
|
||||||
|
_Mon lien+ # Pour ouvrir dans un nouvel onglet
|
||||||
|
|
||||||
# Register in Header. file: My Great file : FILENAME : ALT-TEXT
|
# Fichiers
|
||||||
__My Great file
|
(définir en METAS. ex: file: Mon fichier : FILENAME : ALT-TEXT
|
||||||
|
__Mon fichier
|
||||||
|
|
||||||
# Register in Header. image: 1 : FILENAME : ALT-TEXT
|
# Images
|
||||||
_image:1:[OPT l|r|c (left, right, center, alignment)]
|
(définir en METAS. ex: image: 1 : FILENAME : ALT-TEXT
|
||||||
|
_image:1
|
||||||
_image:1:r
|
_image:1:r
|
||||||
|
|
||||||
# Block-Code File: Register in Header. code: 1 : FILENAME : Alt Text
|
:[l|r|c] (gauche, droite, centre)
|
||||||
|
|
||||||
|
# Block-Code depuis un fichier:
|
||||||
|
(définir en METAS code: 1 : FILENAME : Alt Text
|
||||||
_code:1
|
_code:1
|
||||||
|
|
||||||
# Write in STRONG
|
# Écrire en très gras
|
||||||
**this strong content**
|
**c'est du surgras**
|
||||||
this un**believe**able content
|
c'est in**défini**ssable
|
||||||
this border**line** content
|
il ad**juge** : pas de pub !
|
||||||
|
|
||||||
# BOLD
|
# Gras
|
||||||
*this bold content*
|
*c'est en gras*
|
||||||
...
|
...
|
||||||
|
|
||||||
# Write in ITALIC
|
# Italique
|
||||||
/this em text/
|
écrire /en italique/
|
||||||
|
|
||||||
# Inline-code (¤ = alt-gr + $ on FR keyboard)
|
# Code en ligne (¤ = alt-gr + $ sur clavier FR azerty)
|
||||||
¤push()¤
|
¤gsl help -w¤
|
||||||
|
|
||||||
# Simple Blockquote: Use 3 "-"
|
# Citation simple
|
||||||
|
(au début de la ligne, mettez 3x -)
|
||||||
---
|
---
|
||||||
(
|
(
|
||||||
A simple great quote
|
Une citation simple dans un paragraphe
|
||||||
)
|
)
|
||||||
---
|
---
|
||||||
|
|
||||||
# Advanced Blockquote
|
# Citation avancée
|
||||||
---
|
---
|
||||||
_cite : Richard Matthew Stallman
|
_cite : Richard Matthew Stallman
|
||||||
_link : https://stallman.org/
|
_link : https://stallman.org/
|
||||||
|
@ -224,23 +258,24 @@ world a worse place
|
||||||
)
|
)
|
||||||
---
|
---
|
||||||
|
|
||||||
# For advanced blockquotes, you can also add, if known:
|
# Citation avancée : optionnel
|
||||||
_year: 2021
|
_year: 2021
|
||||||
_book: Esperanza 64
|
_book: Esperanza 64
|
||||||
|
|
||||||
# Create Lists
|
# Créer des listes
|
||||||
Use = to create an item. You can use infinite sub-items, but each Item
|
(utilisez = pour définir l'arborescence). L'arborescence est "infie")
|
||||||
of a list MUST be on the same Line
|
(chaque contenu de la liste doit être sur la même ligne)
|
||||||
|
|
||||||
(
|
(
|
||||||
Let's start a list
|
Voici une liste
|
||||||
= Item 1 is *great*
|
= Fruits : *mangez-en*
|
||||||
== sub-item 1
|
== Kiwis
|
||||||
== sub-item 2
|
== Fraises
|
||||||
=== sub-sub-item 1 of sub-item 2
|
=== pas mûres
|
||||||
== sub-item 3
|
== Bananes
|
||||||
= Item 2
|
= Légumes
|
||||||
== sub-item 1 of Item 2
|
== Épinards
|
||||||
This list is ended
|
Fin de la liste
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -266,7 +301,7 @@ $ gsl [ARG]
|
||||||
add : Add author(s) for DOMAIN
|
add : Add author(s) for DOMAIN
|
||||||
remove : Remove author(s) for DOMAIN
|
remove : Remove author(s) for DOMAIN
|
||||||
|
|
||||||
edit | -E [FILE] [APP] : Open in default EDITOR [FILE] or with APP
|
edit | -E [FILE] : Open in default EDITOR [FILE] or with nano
|
||||||
db [FILE] : Show DB statuses from [FILE]
|
db [FILE] : Show DB statuses from [FILE]
|
||||||
|
|
||||||
sync [OPT] : Sync Templates to www and wip
|
sync [OPT] : Sync Templates to www and wip
|
||||||
|
|
2
control
2
control
|
@ -1,5 +1,5 @@
|
||||||
Package: egsl
|
Package: egsl
|
||||||
Version: 0.0.9
|
Version: 0.0.10
|
||||||
Section: custom
|
Section: custom
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Version: 0.0.9
|
# Version: 0.0.10
|
||||||
# file: gsl
|
# file: gsl
|
||||||
# Folder: /usr/local/bin
|
# Folder: /usr/local/bin
|
||||||
# By echolib
|
# By echolib
|
||||||
|
@ -208,15 +208,10 @@ case "$1" in
|
||||||
&& exit 1
|
&& exit 1
|
||||||
|
|
||||||
gsl__if_file "$2" post
|
gsl__if_file "$2" post
|
||||||
if ! [[ "$EDITOR" ]];then
|
if ! [[ "$EDITOR" ]];then
|
||||||
if [[ "$3" ]];then
|
|
||||||
if__command "$3"
|
|
||||||
EDITOR="$3"
|
|
||||||
else
|
|
||||||
if__command nano
|
if__command nano
|
||||||
EDITOR=`which nano`
|
EDITOR=`which nano`
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
gsl__logs_print \
|
gsl__logs_print \
|
||||||
"$gsl_log_i" \
|
"$gsl_log_i" \
|
||||||
|
@ -235,6 +230,7 @@ case "$1" in
|
||||||
|
|
||||||
gsl_post_hash_old=$gsl_post_hash
|
gsl_post_hash_old=$gsl_post_hash
|
||||||
$EDITOR $PWD/$gsl_this_post
|
$EDITOR $PWD/$gsl_this_post
|
||||||
|
|
||||||
gsl__get_sum "$PWD/$gsl_this_post"
|
gsl__get_sum "$PWD/$gsl_this_post"
|
||||||
if (( $gsl_post_hash != $gsl_post_hash_old ));then
|
if (( $gsl_post_hash != $gsl_post_hash_old ));then
|
||||||
gsl_log_infos="NEW > Hash: $gsl_post_hash | Size: $gsl_post_size"
|
gsl_log_infos="NEW > Hash: $gsl_post_hash | Size: $gsl_post_size"
|
||||||
|
|
|
@ -0,0 +1,299 @@
|
||||||
|
# GSL: Statique Littérateur
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
GSL is a multiple blogs/websites generator based on their domain,
|
||||||
|
written in bash, for minimal dependancies. The websites are nearly all
|
||||||
|
static, except for some includes pages, like listing posts, that nginx
|
||||||
|
can easily get, in your webserver.
|
||||||
|
|
||||||
|
# Dependancies
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- bash
|
||||||
|
- coreutils
|
||||||
|
- curl (to check Posts links response)
|
||||||
|
- rsync
|
||||||
|
|
||||||
|
|
||||||
|
# GSL: Installation
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
In your System /
|
||||||
|
```
|
||||||
|
git clone URL .
|
||||||
|
```
|
||||||
|
|
||||||
|
GSL does NOT use any sudo. To avoid errors, you must give permissions
|
||||||
|
to USER with chown -R to folders.
|
||||||
|
|
||||||
|
## --Prefix for DOMAIN configuration (set according to user choice):
|
||||||
|
- HOME: ~/.config/gsl
|
||||||
|
- GLOBAL: /var/lib/gsl
|
||||||
|
- Folder: --Prefix/domains/ (created with $ gsl new)
|
||||||
|
|
||||||
|
### DOMAIN Datas from Prefix:
|
||||||
|
- Folder: --Prefix/DOMAIN/ (Created by GSL)
|
||||||
|
- - Files: DOMAIN.conf, authors.db (Created by GSL)
|
||||||
|
- - Folder: --Prefix/DOMAIN/templates/ (css, logos...) (Created by GSL)
|
||||||
|
|
||||||
|
## Destination Folder: /etc/gsl/
|
||||||
|
- File: gsl.conf
|
||||||
|
|
||||||
|
## Destination Folder: /var/lib/gsl/
|
||||||
|
- Folder: db (Created by GSL)
|
||||||
|
- Folder: helps
|
||||||
|
- Folder: scripts
|
||||||
|
- File: README.md
|
||||||
|
|
||||||
|
## Destination Folder: /var/log/gsl
|
||||||
|
- File: gsl.log (Created and managed by GSL $ gsl log clean...)
|
||||||
|
|
||||||
|
## Destination Folder: /usr/local/bin
|
||||||
|
- File: gsl
|
||||||
|
|
||||||
|
## Destination Folder: /usr/share/bash-completion/completions/gsl
|
||||||
|
- File: gsl
|
||||||
|
|
||||||
|
# How to configure a DOMAIN folder, and create a Post
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
When Adding a DOMAIN (example.com), GSL will ask you some questions.
|
||||||
|
Datas will be used to create a DOMAIN.conf file. GSL will also ask you
|
||||||
|
to set a folder where you will put your Posts, but you can create or add
|
||||||
|
ones too.
|
||||||
|
|
||||||
|
## Set a DOMAIN
|
||||||
|
- add a DOMAIN name (if not alrady done)
|
||||||
|
```
|
||||||
|
gsl new
|
||||||
|
```
|
||||||
|
|
||||||
|
Follow instructions when adding DOMAIN or see them again with
|
||||||
|
```
|
||||||
|
gsl help new
|
||||||
|
gsl help install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Set a DOMAIN folder for Posts (if not already done by GSL or You)
|
||||||
|
|
||||||
|
- Add/Create or go into your folder of choice
|
||||||
|
- Save into that folder a blank file named gsl.DOMAIN (gsl.example.org)
|
||||||
|
so that GSL, knows this folder is for this DOMAIN website.
|
||||||
|
|
||||||
|
## Create a new Post
|
||||||
|
The engine is written from scratch and looks like a mix of markdown and
|
||||||
|
ReStructuredText. It's very easy to learn and use.
|
||||||
|
|
||||||
|
- Write a post in a file, using some "metas" that GSL will catch.
|
||||||
|
- Save your file with .gsl extension
|
||||||
|
- Start checking it, using:
|
||||||
|
|
||||||
|
```
|
||||||
|
gsl check
|
||||||
|
```
|
||||||
|
|
||||||
|
## Convert one or all Posts
|
||||||
|
If your Post has no error, you will have to deploy html
|
||||||
|
files and folders. You could install nginx, or lightweight darkhttpd
|
||||||
|
webserver on your PC to preview the website. You can also just open
|
||||||
|
index.html in your server folder, but you won't be able to see some extra
|
||||||
|
includes page, like Posts listing.
|
||||||
|
|
||||||
|
To convert your Posts in HTML, use
|
||||||
|
|
||||||
|
```
|
||||||
|
gsl make
|
||||||
|
```
|
||||||
|
|
||||||
|
You can select a specific post, with autocompletion to check and make
|
||||||
|
only that specified one.
|
||||||
|
|
||||||
|
# Create a Templates
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
You will have to create some CSS (styles.css) in your /DOMAIN/templates/
|
||||||
|
- HOME: ~/.config/gsl/domains/DOMAIN/templates/
|
||||||
|
- GLOBAL: /var/lib/gsl/domains/DOMAIN/templates/
|
||||||
|
|
||||||
|
# How to Write a Post
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Post has 2 sections : Before and After #1. #1 is the FIRST Title of your
|
||||||
|
post. #(1-6) are HTML titles.
|
||||||
|
- Before #1 is used to set METAs HEADERS to configure your Post.
|
||||||
|
- From #1 is the CONTENT of your Post
|
||||||
|
|
||||||
|
## NEEDED HEADERS (before #1)
|
||||||
|
Register METAs for HTML Page content
|
||||||
|
|
||||||
|
```
|
||||||
|
title: POST TITLE
|
||||||
|
slug: POST-TITLE (if space in slug GSL will convert them)
|
||||||
|
info: DESCRIPTION (about the Post)
|
||||||
|
author: NAME (must be registred ($ gsl author add)
|
||||||
|
date: YYYY-MM-DD
|
||||||
|
tags: TAG1,OTHER TAG2,TAG3 (comma separated)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Admin Header
|
||||||
|
Admin can define specific type of content. If no type defined, GSL will
|
||||||
|
add at first line the default value: "type: post".
|
||||||
|
|
||||||
|
TYPE:
|
||||||
|
- post < classic content
|
||||||
|
- page < used to define main index, 404, about...
|
||||||
|
|
||||||
|
```
|
||||||
|
type: TYPE
|
||||||
|
```
|
||||||
|
|
||||||
|
GSL will create html file according to slug. Do not add .html to slug.
|
||||||
|
- post < /slug/index.html
|
||||||
|
- page < /slug.html
|
||||||
|
|
||||||
|
## Optional HEADERS (before #1)
|
||||||
|
Register METAs for CONTENT. " : " field separator
|
||||||
|
|
||||||
|
```
|
||||||
|
abbr: SHORT : LONG
|
||||||
|
file: NAME : FILENAME : Alt Text
|
||||||
|
link: NAME : URL : Alt Text
|
||||||
|
code: NBR : FILENAME : Alt Text
|
||||||
|
image: NBR : FILENAME : ALT-TEXT
|
||||||
|
```
|
||||||
|
|
||||||
|
## CONTENT Post:
|
||||||
|
In Content Post, markers (i.e. __My Great file) must be on the SAME line.
|
||||||
|
For ABBRs, just write SHORT in your content
|
||||||
|
|
||||||
|
```
|
||||||
|
# Paragraphs
|
||||||
|
At begining of new line, open with ( and close with )
|
||||||
|
Set till 3 different classes with ( 1 ( 2 ( 3
|
||||||
|
( 2
|
||||||
|
This is a paragraph with class 2
|
||||||
|
)
|
||||||
|
|
||||||
|
# Register in Header. link: My Great Link : URL : Alt text
|
||||||
|
_My Great Link
|
||||||
|
_My Great Link+ # Open in new tab
|
||||||
|
|
||||||
|
# Register in Header. file: My Great file : FILENAME : ALT-TEXT
|
||||||
|
__My Great file
|
||||||
|
|
||||||
|
# Register in Header. image: 1 : FILENAME : ALT-TEXT
|
||||||
|
_image:1:[OPT l|r|c (left, right, center, alignment)]
|
||||||
|
_image:1:r
|
||||||
|
|
||||||
|
# Block-Code File: Register in Header. code: 1 : FILENAME : Alt Text
|
||||||
|
_code:1
|
||||||
|
|
||||||
|
# Write in STRONG
|
||||||
|
**this strong content**
|
||||||
|
this un**believe**able content
|
||||||
|
this border**line** content
|
||||||
|
|
||||||
|
# BOLD
|
||||||
|
*this bold content*
|
||||||
|
...
|
||||||
|
|
||||||
|
# Write in ITALIC
|
||||||
|
/this em text/
|
||||||
|
|
||||||
|
# Inline-code (¤ = alt-gr + $ on FR keyboard)
|
||||||
|
¤push()¤
|
||||||
|
|
||||||
|
# Simple Blockquote: Use 3 "-"
|
||||||
|
---
|
||||||
|
(
|
||||||
|
A simple great quote
|
||||||
|
)
|
||||||
|
---
|
||||||
|
|
||||||
|
# Advanced Blockquote
|
||||||
|
---
|
||||||
|
_cite : Richard Matthew Stallman
|
||||||
|
_link : https://stallman.org/
|
||||||
|
_lang : en
|
||||||
|
(
|
||||||
|
In the free/libre software movement, we develop software that respects
|
||||||
|
users' freedom, so we and you can escape from software that doesn't. I
|
||||||
|
could have made money this way, and perhaps amused myself writing code.
|
||||||
|
But I knew that at the end of my career, I would look back on years of
|
||||||
|
building walls to divide people, and feel I had spent my life making the
|
||||||
|
world a worse place
|
||||||
|
)
|
||||||
|
---
|
||||||
|
|
||||||
|
# For advanced blockquotes, you can also add, if known:
|
||||||
|
_year: 2021
|
||||||
|
_book: Esperanza 64
|
||||||
|
|
||||||
|
# Create Lists
|
||||||
|
Use = to create an item. You can use infinite sub-items, but each Item
|
||||||
|
of a list MUST be on the same Line
|
||||||
|
(
|
||||||
|
Let's start a list
|
||||||
|
= Item 1 is *great*
|
||||||
|
== sub-item 1
|
||||||
|
== sub-item 2
|
||||||
|
=== sub-sub-item 1 of sub-item 2
|
||||||
|
== sub-item 3
|
||||||
|
= Item 2
|
||||||
|
== sub-item 1 of Item 2
|
||||||
|
This list is ended
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
# HELP COMMAND
|
||||||
|
```
|
||||||
|
$ gsl [ARG]
|
||||||
|
readme : Show README.md instructions
|
||||||
|
help | -h [OPT] : This Help
|
||||||
|
install : Show process installation
|
||||||
|
new : Adding a DOMAIN
|
||||||
|
write | -w : How to write a Post
|
||||||
|
|
||||||
|
new | -N : Add and configure a new DOMAIN
|
||||||
|
|
||||||
|
log | -L [OPTS] : Show logs from all sessions
|
||||||
|
clean | -C : Logs saved to {DATE}.gsl.log and cleaned
|
||||||
|
-i | -w | -e : from levels (infos, warnings, errors)
|
||||||
|
-s : from last session only
|
||||||
|
[TERM] : [TERM] : case insensitive, regex 'T1.*T2'
|
||||||
|
(i.e. $ gsl log -e -s code)
|
||||||
|
|
||||||
|
author | -A [OPT] : List authors from DOMAIN set in PWD folder
|
||||||
|
add : Add author(s) for DOMAIN
|
||||||
|
remove : Remove author(s) for DOMAIN
|
||||||
|
|
||||||
|
edit | -E [FILE] : Open in default EDITOR [FILE] or with nano
|
||||||
|
db [FILE] : Show DB statuses from [FILE]
|
||||||
|
|
||||||
|
sync [OPT] : Sync Templates to www and wip
|
||||||
|
wip : Only to wip server (also done with make)
|
||||||
|
www : Only to www server (also done with www)
|
||||||
|
|
||||||
|
|
||||||
|
check | -C [OPT] [FILE] : Check Posts errors from PWD folder or [FILE]
|
||||||
|
-F : Force check again
|
||||||
|
|
||||||
|
make | -M [OPT] [FILE] : Convert Posts from PWD folder or [FILE]
|
||||||
|
to HTML file in server
|
||||||
|
-F : Force Make again
|
||||||
|
|
||||||
|
post-list [OPT] [FILE] : Add post again from [FILE] to Last-Posts List
|
||||||
|
(When converting new post, it will be added)
|
||||||
|
Pin : Set Post from [FILE] to first in Last-Posts List
|
||||||
|
Add : Add Post from [FILE] to last in Last-Posts List
|
||||||
|
|
||||||
|
www [OPT1] [OPT2] : Add/Remove Post from www server
|
||||||
|
[OPT1]:
|
||||||
|
add : Add all/[FILE] to www server
|
||||||
|
rmove : remove all/[FILE] from www server
|
||||||
|
[OPT2]:
|
||||||
|
all : Select all post with wip statuses
|
||||||
|
[FILE] : Select specific post (if wip status)
|
||||||
|
|
||||||
|
version | -v : Show local versionn
|
||||||
|
-vv : Shown local and repo Versions
|
||||||
|
```
|
|
@ -1,12 +1,13 @@
|
||||||
# GSL: Statique Littérateur
|
# GSL: Statique Littérateur
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
GSL is a multiple blogs/websites generator based on their domain,
|
GSL est un générateur de blogs/sites-web basé sur leur nom de domaine,
|
||||||
written in bash, for minimal dependancies. The websites are nearly all
|
écrit en bash, afin de ne réduire ses dépendances au minimum. Les pages
|
||||||
static, except for some includes pages, like listing posts, that nginx
|
générées sont presque entièrement statiques, à l'exception du module de
|
||||||
can easily get, in your webserver.
|
liste des derniers articles. Nginx peut être facilement configuré pour
|
||||||
|
interprêter ce module.
|
||||||
|
|
||||||
# Dependancies
|
# Dépendances
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
- bash
|
- bash
|
||||||
|
@ -17,199 +18,232 @@ can easily get, in your webserver.
|
||||||
|
|
||||||
# GSL: Installation
|
# GSL: Installation
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
In your System /
|
Une procédure d'installation via un setup est en cours de test. Il est
|
||||||
```
|
aussi possible et recommandé sous debian de l'installer grâce à son
|
||||||
git clone URL .
|
paquet deb.
|
||||||
```
|
|
||||||
|
|
||||||
GSL does NOT use any sudo. To avoid errors, you must give permissions
|
Pour une installation manuelle, clonez ce dépôt, et copiez les dossiers
|
||||||
to USER with chown -R to folders.
|
déjà pré-établis dans le système. GSL n'utilise pas sudo, il vous faut
|
||||||
|
donc donner les droits aux dossiers (chown -R) à l'utilisateur
|
||||||
|
(sauf au dossier /usr/local/bin). Pour ce dossier, vous donnerez les droits
|
||||||
|
via chown USER:USER /usr/local/bin/gsl
|
||||||
|
|
||||||
## --Prefix for DOMAIN configuration (set according to user choice):
|
## Configuration du DOMAIN (selon le choix de l'utilistaeur via $ gsl new) :
|
||||||
- HOME: ~/.config/gsl
|
- HOME: ~/.config/gsl
|
||||||
- GLOBAL: /var/lib/gsl
|
- GLOBAL: /var/lib/gsl
|
||||||
- Folder: --Prefix/domains/ (created with $ gsl new)
|
- Dossier: --Prefix/domains/ (créé par GSL via $ gsl new)
|
||||||
|
|
||||||
### DOMAIN Datas from Prefix:
|
### Données du DOMAIN :
|
||||||
- Folder: --Prefix/DOMAIN/ (Created by GSL)
|
- Dossier: --Prefix/DOMAIN/ (créé par GSL)
|
||||||
- - Files: DOMAIN.conf, authors.db (Created by GSL)
|
- - Fichiers: DOMAIN.conf, authors.db (créé par GSL)
|
||||||
- - Folder: --Prefix/DOMAIN/templates/ (css, logos...) (Created by GSL)
|
- - Dossier: --Prefix/DOMAIN/templates/ (créé par GSL - pour vos css, logos...)
|
||||||
|
|
||||||
## Destination Folder: /etc/gsl/
|
## Dossier de configuration de GSL : /etc/gsl/
|
||||||
- File: gsl.conf
|
- Fichier: gsl.conf
|
||||||
|
|
||||||
## Destination Folder: /var/lib/gsl/
|
## Dossier principal : /var/lib/gsl/
|
||||||
- Folder: db (Created by GSL)
|
- Folder: db (créé par GSL)
|
||||||
- Folder: helps
|
- Dossier: helps
|
||||||
- Folder: scripts
|
- Dossier: scripts
|
||||||
- File: README.md
|
- Fichier: README.md, README-english.md
|
||||||
|
|
||||||
## Destination Folder: /var/log/gsl
|
## Dossier des logs: /var/log/gsl/
|
||||||
- File: gsl.log (Created and managed by GSL $ gsl log clean...)
|
- Fichier: gsl.log (créé et géré par GSL via $ gsl log [OPT]...)
|
||||||
|
|
||||||
## Destination Folder: /usr/local/bin
|
## Dossier de l'éxécutable : /usr/local/bin/
|
||||||
- File: gsl
|
- Fichier: gsl
|
||||||
|
|
||||||
## Destination Folder: /usr/share/bash-completion/completions/gsl
|
## Dossier d'autocomplétion : /usr/share/bash-completion/completions/gsl/
|
||||||
- File: gsl
|
- Fichier: gsl
|
||||||
|
|
||||||
# How to configure a DOMAIN folder, and create a Post
|
# Comment configurer un domaine
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
When Adding a DOMAIN (example.com), GSL will ask you some questions.
|
Des questions vous seront posées lorsque vous voudrez ajouter un domaine
|
||||||
Datas will be used to create a DOMAIN.conf file. GSL will also ask you
|
(exemple.com). Les données renseignées seront utilisées pour créer le
|
||||||
to set a folder where you will put your Posts, but you can create or add
|
fichier DOMAIN.conf. Une question spécifique pour les fichier des articles
|
||||||
ones too.
|
vous sera posée afin d'établir un dossier de stockage de vos articles.
|
||||||
|
Vous pourrez en créer à loisir autant que vous voulez plus tard.
|
||||||
|
|
||||||
## Set a DOMAIN
|
|
||||||
- add a DOMAIN name (if not alrady done)
|
|
||||||
```
|
```
|
||||||
|
# helps
|
||||||
|
gsl help
|
||||||
|
gsl help new
|
||||||
|
gsl help install
|
||||||
|
|
||||||
|
# Ajouter un domaine
|
||||||
gsl new
|
gsl new
|
||||||
```
|
```
|
||||||
|
|
||||||
Follow instructions when adding DOMAIN or see them again with
|
## Définir un dossier pour les articles du DOMAIN
|
||||||
|
Si ce n'est pas déjà fait par GSL, ou que vous voulez ajouter un dossier
|
||||||
|
pour y stocker et convertir en HTML vos articles pour un DOMAIN prévis :
|
||||||
|
|
||||||
|
- Ajouter/créer un dossier de votre choix
|
||||||
|
- Créer un fichier vide nommé gsl.DOMAIAN (gsl.exemple.com)
|
||||||
|
|
||||||
|
## Ajouter un auteur
|
||||||
```
|
```
|
||||||
gsl help new
|
cd MON-DOSSER-ARTICLES
|
||||||
gsl help install
|
gsl author add
|
||||||
```
|
```
|
||||||
|
|
||||||
## Set a DOMAIN folder for Posts (if not already done by GSL or You)
|
## Créer un article
|
||||||
|
Le moteur de convertion est nouveau, et est un mélange entre markdown et
|
||||||
|
reSTructuredText. Il est simple à apprendre et à utiliser.
|
||||||
|
|
||||||
- Add/Create or go into your folder of choice
|
- Créer un fichier (monarticle).gsl (extension .gsl)
|
||||||
- Save into that folder a blank file named gsl.DOMAIN (gsl.example.org)
|
- Suivez le guide plus bas pour comprendre les notions
|
||||||
so that GSL, knows this folder is for this DOMAIN website.
|
|
||||||
|
|
||||||
## Create a new Post
|
|
||||||
The engine is written from scratch and looks like a mix of markdown and
|
|
||||||
ReStructuredText. It's very easy to learn and use.
|
|
||||||
|
|
||||||
- Write a post in a file, using some "metas" that GSL will catch.
|
|
||||||
- Save your file with .gsl extension
|
|
||||||
- Start checking it, using:
|
|
||||||
|
|
||||||
|
Vous devrez le faire valider par GSL :
|
||||||
```
|
```
|
||||||
gsl check
|
gsl check
|
||||||
```
|
```
|
||||||
|
|
||||||
## Convert one or all Posts
|
## Convertir un ou tous les articles
|
||||||
If your Post has no error, you will have to deploy html
|
Si votre article n'a pas d'erreurs, vous pouvez le convertir en HTML.
|
||||||
files and folders. You could install nginx, or lightweight darkhttpd
|
|
||||||
webserver on your PC to preview the website. You can also just open
|
|
||||||
index.html in your server folder, but you won't be able to see some extra
|
|
||||||
includes page, like Posts listing.
|
|
||||||
|
|
||||||
To convert your Posts in HTML, use
|
|
||||||
|
|
||||||
```
|
```
|
||||||
gsl make
|
gsl make
|
||||||
```
|
```
|
||||||
|
|
||||||
You can select a specific post, with autocompletion to check and make
|
Votre article sera prêt dans le dossier webserver (ex: /var/www/DOMAIN/wip)
|
||||||
only that specified one.
|
Vous pourrez donc vérifier son rendu.
|
||||||
|
|
||||||
# Create a Templates
|
Si vous êtes satisfait, vous pouvez le déployer "officiellement" dans www
|
||||||
|
|
||||||
|
```
|
||||||
|
# Vous pouvez utiliser l'autocompletion pour les articles
|
||||||
|
gsl www add (monarticle.gsl)
|
||||||
|
```
|
||||||
|
|
||||||
|
# Créer un Template
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
You will have to create some CSS (styles.css) in your /DOMAIN/templates/
|
Vous devrez pour que votre site soit à vôtre goût créer et définir les
|
||||||
|
styles dans styles.css. Placez ce fichier (en fonction du choix de votre
|
||||||
|
configuration du DOMAIN) dans :
|
||||||
- HOME: ~/.config/gsl/domains/DOMAIN/templates/
|
- HOME: ~/.config/gsl/domains/DOMAIN/templates/
|
||||||
- GLOBAL: /var/lib/gsl/domains/DOMAIN/templates/
|
- GLOBAL: /var/lib/gsl/domains/DOMAIN/templates/
|
||||||
|
|
||||||
# How to Write a Post
|
Astuce: Une fois votre article créé, vous verrez dans sa source que
|
||||||
|
beaucoup d'éléments ont une class="acronymechoisi_***". Utilisez ces classes.
|
||||||
|
Pour mettre à jour et voir vos modifications
|
||||||
|
|
||||||
|
```
|
||||||
|
gsl sync
|
||||||
|
# ou (si vous modifier le header/footer)
|
||||||
|
gsl make -F
|
||||||
|
```
|
||||||
|
|
||||||
|
# Comment écrire un article
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
Post has 2 sections : Before and After #1. #1 is the FIRST Title of your
|
Votre article doit contenir 2 sections. Les Metas avant #1 et
|
||||||
post. #(1-6) are HTML titles.
|
l'article à partir de ce repère (servant de titre h1).
|
||||||
- Before #1 is used to set METAs HEADERS to configure your Post.
|
|
||||||
- From #1 is the CONTENT of your Post
|
- METAS : configurer votre article (titre, date, liens...)
|
||||||
|
- ARTICLE : Contenue rédactionnel avec quelques marqueurs (gras...)
|
||||||
|
|
||||||
|
## METAS obligatoires (avant #1)
|
||||||
|
|
||||||
## NEEDED HEADERS (before #1)
|
|
||||||
Register METAs for HTML Page content
|
|
||||||
|
|
||||||
```
|
```
|
||||||
title: POST TITLE
|
title: POST TITLE
|
||||||
slug: POST-TITLE (if space in slug GSL will convert them)
|
slug: POST-TITLE (si espaces, GSL les convertira en -)
|
||||||
info: DESCRIPTION (about the Post)
|
info: DESCRIPTION (À propos de cet article)
|
||||||
author: NAME (must be registred ($ gsl author add)
|
author: NAME (doit être enregistré via ($ gsl author add)
|
||||||
date: YYYY-MM-DD
|
date: YYYY-MM-DD
|
||||||
tags: TAG1,OTHER TAG2,TAG3 (comma separated)
|
tags: TAG1,Mon TAG2,TAG3 (séparé par une virgule)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Admin Header
|
### Page ou Article ?
|
||||||
Admin can define specific type of content. If no type defined, GSL will
|
Vous pouvez spécifiez pour chaque article si c'est une page ou un article
|
||||||
add at first line the default value: "type: post".
|
Si non renseigné, GSL ajoutera le type: post (article) par défaut à la
|
||||||
|
première ligne de votre article
|
||||||
|
|
||||||
TYPE:
|
TYPE:
|
||||||
- post < classic content
|
- post < Article
|
||||||
- page < used to define main index, 404, about...
|
- page < Page (créer vos pages: index, 404, about...)
|
||||||
|
|
||||||
```
|
```
|
||||||
type: TYPE
|
type: TYPE
|
||||||
```
|
```
|
||||||
|
|
||||||
GSL will create html file according to slug. Do not add .html to slug.
|
GSL créera vos fichier HTML selon le "slug" renseigné. Ne pas ajouter .html
|
||||||
- post < /slug/index.html
|
Selon le type:
|
||||||
- page < /slug.html
|
|
||||||
|
|
||||||
## Optional HEADERS (before #1)
|
- post < /POST-TITLE/index.html
|
||||||
Register METAs for CONTENT. " : " field separator
|
- page < /POST-TITLE.html
|
||||||
|
|
||||||
|
## METAS optionnelles (avant #1)
|
||||||
|
Définir les marqueurs (abbr:, link:...) et utilisr " : " comme séparateur
|
||||||
|
|
||||||
```
|
```
|
||||||
abbr: SHORT : LONG
|
abbr: COURT : LONG
|
||||||
file: NAME : FILENAME : Alt Text
|
file: NOM : NOM-DU-FICHIER : Text alternatif
|
||||||
link: NAME : URL : Alt Text
|
link: NOM : URL : Text alternatif
|
||||||
code: NBR : FILENAME : Alt Text
|
code: NUMERO : NOM-DU-FICHIER : Text alternatif
|
||||||
image: NBR : FILENAME : ALT-TEXT
|
image: NUMERO : NOM-DU-FICHIER : TEXT-ALTERNATIF
|
||||||
```
|
```
|
||||||
|
|
||||||
## CONTENT Post:
|
## Contenu de l'article:
|
||||||
In Content Post, markers (i.e. __My Great file) must be on the SAME line.
|
Les marqueurs (ex __Mon-super-fichier) doivent commencer et finir sur
|
||||||
For ABBRs, just write SHORT in your content
|
la même ligne. Pour les abréviations (abbr:), écrivez juste (ex: COURT).
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
# Paragraphs
|
# Paragraphes
|
||||||
At begining of new line, open with ( and close with )
|
Au début d'une nouvelle ligne, ouvrez avec ( et fermez avec ).
|
||||||
Set till 3 different classes with ( 1 ( 2 ( 3
|
Vous pouvez utiliser 4 classes de paragraphes différentes : ( 1 ( 2 ( 3
|
||||||
( 2
|
( 2
|
||||||
This is a paragraph with class 2
|
Paragraphe avec une classe 2 (css)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Register in Header. link: My Great Link : URL : Alt text
|
# Liens
|
||||||
_My Great Link
|
(définir en METAS. ex: link: Mon lien : URL : Alt text)
|
||||||
_My Great Link+ # Open in new tab
|
_Mon lien
|
||||||
|
_Mon lien+ # Pour ouvrir dans un nouvel onglet
|
||||||
|
|
||||||
# Register in Header. file: My Great file : FILENAME : ALT-TEXT
|
# Fichiers
|
||||||
__My Great file
|
(définir en METAS. ex: file: Mon fichier : FILENAME : ALT-TEXT
|
||||||
|
__Mon fichier
|
||||||
|
|
||||||
# Register in Header. image: 1 : FILENAME : ALT-TEXT
|
# Images
|
||||||
_image:1:[OPT l|r|c (left, right, center, alignment)]
|
(définir en METAS. ex: image: 1 : FILENAME : ALT-TEXT
|
||||||
|
_image:1
|
||||||
_image:1:r
|
_image:1:r
|
||||||
|
|
||||||
# Block-Code File: Register in Header. code: 1 : FILENAME : Alt Text
|
:[l|r|c] (gauche, droite, centre)
|
||||||
|
|
||||||
|
# Block-Code depuis un fichier:
|
||||||
|
(définir en METAS code: 1 : FILENAME : Alt Text
|
||||||
_code:1
|
_code:1
|
||||||
|
|
||||||
# Write in STRONG
|
# Écrire en très gras
|
||||||
**this strong content**
|
**c'est du surgras**
|
||||||
this un**believe**able content
|
c'est in**défini**ssable
|
||||||
this border**line** content
|
il ad**juge** : pas de pub !
|
||||||
|
|
||||||
# BOLD
|
# Gras
|
||||||
*this bold content*
|
*c'est en gras*
|
||||||
...
|
...
|
||||||
|
|
||||||
# Write in ITALIC
|
# Italique
|
||||||
/this em text/
|
écrire /en italique/
|
||||||
|
|
||||||
# Inline-code (¤ = alt-gr + $ on FR keyboard)
|
# Code en ligne (¤ = alt-gr + $ sur clavier FR azerty)
|
||||||
¤push()¤
|
¤gsl help -w¤
|
||||||
|
|
||||||
# Simple Blockquote: Use 3 "-"
|
# Citation simple
|
||||||
|
(au début de la ligne, mettez 3x -)
|
||||||
---
|
---
|
||||||
(
|
(
|
||||||
A simple great quote
|
Une citation simple dans un paragraphe
|
||||||
)
|
)
|
||||||
---
|
---
|
||||||
|
|
||||||
# Advanced Blockquote
|
# Citation avancée
|
||||||
---
|
---
|
||||||
_cite : Richard Matthew Stallman
|
_cite : Richard Matthew Stallman
|
||||||
_link : https://stallman.org/
|
_link : https://stallman.org/
|
||||||
|
@ -224,23 +258,24 @@ world a worse place
|
||||||
)
|
)
|
||||||
---
|
---
|
||||||
|
|
||||||
# For advanced blockquotes, you can also add, if known:
|
# Citation avancée : optionnel
|
||||||
_year: 2021
|
_year: 2021
|
||||||
_book: Esperanza 64
|
_book: Esperanza 64
|
||||||
|
|
||||||
# Create Lists
|
# Créer des listes
|
||||||
Use = to create an item. You can use infinite sub-items, but each Item
|
(utilisez = pour définir l'arborescence). L'arborescence est "infie")
|
||||||
of a list MUST be on the same Line
|
(chaque contenu de la liste doit être sur la même ligne)
|
||||||
|
|
||||||
(
|
(
|
||||||
Let's start a list
|
Voici une liste
|
||||||
= Item 1 is *great*
|
= Fruits : *mangez-en*
|
||||||
== sub-item 1
|
== Kiwis
|
||||||
== sub-item 2
|
== Fraises
|
||||||
=== sub-sub-item 1 of sub-item 2
|
=== pas mûres
|
||||||
== sub-item 3
|
== Bananes
|
||||||
= Item 2
|
= Légumes
|
||||||
== sub-item 1 of Item 2
|
== Épinards
|
||||||
This list is ended
|
Fin de la liste
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -266,7 +301,7 @@ $ gsl [ARG]
|
||||||
add : Add author(s) for DOMAIN
|
add : Add author(s) for DOMAIN
|
||||||
remove : Remove author(s) for DOMAIN
|
remove : Remove author(s) for DOMAIN
|
||||||
|
|
||||||
edit | -E [FILE] [APP] : Open in default EDITOR [FILE] or with APP
|
edit | -E [FILE] : Open in default EDITOR [FILE] or with nano
|
||||||
db [FILE] : Show DB statuses from [FILE]
|
db [FILE] : Show DB statuses from [FILE]
|
||||||
|
|
||||||
sync [OPT] : Sync Templates to www and wip
|
sync [OPT] : Sync Templates to www and wip
|
||||||
|
|
|
@ -20,7 +20,7 @@ $ gsl [ARG]
|
||||||
add : Add author(s) for DOMAIN
|
add : Add author(s) for DOMAIN
|
||||||
remove : Remove author(s) for DOMAIN
|
remove : Remove author(s) for DOMAIN
|
||||||
|
|
||||||
edit | -E [FILE] [APP] : Open in default EDITOR [FILE] or with APP
|
edit | -E [FILE] : Open in default EDITOR [FILE] or with nano
|
||||||
db [FILE] : Show DB statuses from [FILE]
|
db [FILE] : Show DB statuses from [FILE]
|
||||||
|
|
||||||
sync [OPT] : Sync Templates to www and wip
|
sync [OPT] : Sync Templates to www and wip
|
||||||
|
|
Loading…
Reference in New Issue