Go to file
Cyrille L 470757fb89 auto-completion for post ; readme ; install 2022-02-16 16:57:20 +01:00
etc/gsl Checkers, new tag meta, fix processes... 2022-02-16 14:11:41 +01:00
usr auto-completion for post ; readme ; install 2022-02-16 16:57:20 +01:00
var/lib/gsl auto-completion for post ; readme ; install 2022-02-16 16:57:20 +01:00
LICENSE Fixes + checkers added 2022-02-14 00:23:33 +01:00
README.md auto-completion for post ; readme ; install 2022-02-16 16:57:20 +01:00

README.md

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)

GSL: Installation


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)
    • 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


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:

  • 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
  • Save into that folder a blank file named gsl.DOMAIN (gsl.example.org) to tell GSL, this folder is for this DOMAIN website.

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:
gsl check

If your Post has no error, you will have some ready to deploy html files and folders. You could install lightweight darkhttpd webserver on your PC to preview the website, or even, juste open index.html in your server folder.

Create a Templates


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


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)

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