A static site generator. Turn a markdown file into a nice web page.
-
Requires python 3.8 or greater, with two packages not in the standard library.
pip install markdown toml
This requires X11 as the window manager, because it uses xdotool to update the Firefox tab.
-
Arch install
sudo pacman -S xdotool
-
Ubuntu install
sudo apt install xdotool
xdotool is what I used to implement automatically updating Firefox
This program is meant to read a simple config, and stylesheet, to create a nice looking page based on what's in based in the given markdown file.
[website]
url = 'example.com'
blog = 'articlestorage'
favicon = 'ghost.svg'
[article]
title = 'README'
[resources.markdown]
path = 'README.md'
[resources.style]
path = 'style.css'
-
Run this to initialize.
python fitzwriter.py init
-
If it was initialized earlier.
python fitzwriter.py -f blog.toml
-
To launch an HTTP server and view the updates on save.
python fitzwriter.py -l -f blog.toml
Right now it is set up to handle reloading on save, in Firefox.
-
You can launch a basic HTTP server with python.
python -m http.server 8000
- Then open localhost:8000 in Firefox.
-
Or just open index.html in Firefox.
Just add [TOC] to the first line of the .md file to create a table of contents.