gsl-statique-litterateur/var/lib/gsl/README.md

230 lines
5.9 KiB
Markdown
Raw Normal View History

2022-02-14 00:23:33 +01:00
# GSL: Statique Littérateur
2022-02-16 14:30:04 +01:00
------------------------------------------------------------------------
2022-02-14 00:23:33 +01:00
GSL is a multiple blogs/websites generator based on their domain,
written in bash, for minimal dependancies. The websites are nearly all
2022-02-16 14:30:04 +01:00
static, except for some includes pages, like listing posts, that nginx
can easily get, in your webserver.
2022-02-14 00:23:33 +01:00
# Dependancies
2022-02-16 14:30:04 +01:00
------------------------------------------------------------------------
2022-02-14 00:23:33 +01:00
- bash
- coreutils
2022-02-15 17:56:45 +01:00
- curl (to check Posts links response)
2022-02-14 00:23:33 +01:00
# GSL: Installation
2022-02-16 14:30:04 +01:00
------------------------------------------------------------------------
2022-02-27 19:16:16 +01:00
In your System /
```
git clone URL .
```
2022-02-14 00:23:33 +01:00
2022-02-27 19:16:16 +01:00
GSL does NOT use any sudo. To avoid errors, you must give permissions
to USER with chown -R to folders.
2022-02-14 00:23:33 +01:00
## --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)
2022-02-16 14:40:26 +01:00
- - Folder: --Prefix/DOMAIN/templates/ (css, logos...) (Created by GSL)
2022-02-14 00:23:33 +01:00
## 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
2022-02-14 00:23:33 +01:00
# How to configure a DOMAIN folder, and create a Post
2022-02-16 14:30:04 +01:00
------------------------------------------------------------------------
2022-02-27 19:16:16 +01:00
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.
2022-02-14 00:23:33 +01:00
## 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
```
2022-02-27 19:16:16 +01:00
## Set a DOMAIN folder for Posts (if not already done by GSL or You)
2022-02-16 14:30:04 +01:00
- Add/Create or go into your folder of choice
2022-02-14 00:23:33 +01:00
- Save into that folder a blank file named gsl.DOMAIN (gsl.example.org)
2022-02-27 19:16:16 +01:00
so that GSL, knows this folder is for this DOMAIN website.
2022-02-14 00:23:33 +01:00
## 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.
2022-02-27 19:16:16 +01:00
- Write a post in a file, using some "metas" that GSL will catch.
2022-02-14 00:23:33 +01:00
- Save your file with .gsl extension
- Start checking it, using:
2022-02-16 14:30:04 +01:00
2022-02-14 00:23:33 +01:00
```
gsl check
```
2022-02-16 14:30:04 +01:00
2022-02-27 19:16:16 +01:00
## 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.
2022-02-14 00:23:33 +01:00
# Create a Templates
2022-02-16 14:30:04 +01:00
------------------------------------------------------------------------
2022-02-27 19:16:16 +01:00
You will have to create some CSS (styles.css) in your /DOMAIN/templates/
2022-02-14 00:23:33 +01:00
- HOME: ~/.config/gsl/domains/DOMAIN/templates/
- GLOBAL: /var/lib/gsl/domains/DOMAIN/templates/
# How to Write a Post
2022-02-16 14:30:04 +01:00
------------------------------------------------------------------------
2022-02-27 19:16:16 +01:00
Post has 2 sections : Before and After #1. #1 is the FIRST Title of your
2022-03-06 16:28:29 +01:00
post. #(1-6) are HTML titles.
- Before #1 is used to set METAs HEADERS to configure your Post.
2022-02-27 19:16:16 +01:00
- 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)
2022-02-27 19:16:16 +01:00
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
2022-02-27 19:16:16 +01:00
file: NAME : FILENAME : Alt Text
link: NAME : URL : Alt Text
code: NBR : FILENAME : Alt Text
image: NBR : FILENAME : ALT-TEXT
```
## CONTENT Post:
2022-02-27 19:16:16 +01:00
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
)
2022-02-27 19:16:16 +01:00
# Register in Header. link: My Great Link : URL : Alt text
_My Great Link
_My Great Link+ # Open in new tab
2022-02-27 19:16:16 +01:00
# Register in Header. file: My Great file : FILENAME : ALT-TEXT
__My Great file
# Register in Header. image: 1 : FILENAME : ALT-TEXT
2022-03-02 14:27:50 +01:00
_image:1:[OPT l|r|c (left, right, center, alignment)]
_image:1:r
2022-02-27 19:16:16 +01:00
# Block-Code File: Register in Header. code: 1 : FILENAME : Alt Text
2022-03-02 14:27:50 +01:00
_code:1
# Write in STRONG
2022-02-27 19:16:16 +01:00
**this strong content**
this un**believe**able content
this border**line** content
# BOLD
2022-02-27 19:16:16 +01:00
*this bold content*
...
2022-02-27 19:16:16 +01:00
# Write in ITALIC
/this em text/
# Inline-code (¤ = alt-gr + $ on FR keyboard)
¤push()¤
# Simple Blockquote
---
(
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
)
---
2022-02-27 19:16:16 +01:00
# For advanced blockquotes, you can also add, if known:
_year: 2021
_book: Esperanza 64
```