# 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 ------------------------------------------------------------------------ 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 (