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

205 lines
5.2 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-14 00:23:33 +01:00
To avoid sudo, you should give permissions to USER
## --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-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
```
## Set a DOMAIN folder
if not already done:
2022-02-16 14:30:04 +01:00
- GSl will ask you to create a folder for your DOMAIN posts when adding a new domain
- 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-16 14:30:04 +01:00
to tell GSL, this folder is for this DOMAIN website.
2022-02-14 00:23:33 +01:00
## Create a new Post
- Write a post in a file, using some "metas" that GSL will catch.
The engine is written from scratch and looks like a mix of markdown and
ReStructuredText. It's very easy to learn and use.
- 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-14 00:23:33 +01:00
If your Post has no error, you will have some ready to deploy html
files and folders. You could install lightweight darkhttpd webserver on
2022-02-16 14:30:04 +01:00
your PC to preview the website, or even, juste open index.html in your
server folder.
2022-02-14 00:23:33 +01:00
# Create a Templates
2022-02-16 14:30:04 +01:00
------------------------------------------------------------------------
2022-02-14 00:23:33 +01:00
You will have to create some CSS in your /DOMAIN/templates/
- 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
------------------------------------------------------------------------
Post has 2 sections : Before and after "#1". "#1" is the FIRST
Title of your post. Number (1-6) are HTML titles (h1 to h6).
- Before #1 is used to set METAs HEADERS to configure your Post.
- After #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 with $ 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
image: NBR : FILENAME : ALT-TEXT
```
## CONTENT Post:
In Content Post, markers (i.e. [_,_],*_,_*...) 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 )
(
This is a paragraph
)
# Register in Header. link: My Great link : URL : ALT-TEXT
[_My Great Link_]
# Write in ITALIC
/_this em text_/
# Write in STRONG
**_this strong content_**
# BOLD
*_this bold content_*
# Register in Header. file: My Great file : FILENAME : ALT-TEXT
<_My Great file_>
# Inline-code (¤ = alt-gr + $ on FR keyboard)
¤_push()_¤
# Lists
=> list 1
==> sublist 1
===> sub-sublist 1
=> list 2
# 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
)
---
# Register in Header. image: 1 : FILENAME : ALT-TEXT
_image_ : 1
# Block-Code File: Register in Header. code: 1 : FILENAME
_code_ : 1
```