~lioploum/ploum.net

Static generator for my blog with content

4a19b01 typo par gboussard

2 days ago

f6ada79 nouvelle photo clown

2 days ago
# Ploum.net

This repository contains my blog posts and a script used to generate them.

Pour une explication de la philosophie du site en français, voyez:
https://ploum.net/2022-12-04-fin-du-blog-et-derniere-version.html

Posts are separated into "fr" and "en" directories. They all should be called with YY-MM-DD-TITLE.gmi.

## Publish.py

Will goes into "fr" and "en" folders, read all YYYY-MM-DD-title.gmi files and create the following:

1. Gemini version of the blog with index in ../public_gemini
2. Html version ofthe blog with index in ../public_html using page_template.html
3. An atom feed for the blog and each language


There’s a distinction between "new" posts and "old" posts (which are from Wordpress). The reason is to keep the old URL (cool URL never change). So "new" posts are converted to "DATE-SLUG.html" while "old" posts are converted to "SLUG/index.html". But you still can make "old" posts that are more recent than some new ones.

## post-receive.sh

To be put in the distant repository to call publish.py after each git push.
(post-receive is not used on sourcehut. See build.yml instead)

## resize_image.py 

Ensure pictures are not wider than 800px


## convert2gmi.py

This script takes a pelican export from Wordpress and convert it to gemini files. In a perfect world, it should be used only once. But I still keep finding problem and having to regenerate all of the "old" posts.


## send2blog.py

This script take a post and makes a mail out of it (txt+html) to send it to different mailing-list.