Skip to content

Fitzy1293/fitzwriter

Repository files navigation

fitzwriter

A static site generator. Turn a markdown file into a nice web page.

Links

Requirements

  • 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

How to use it

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.

Configure a TOML file like below

[website]
url = 'example.com'
blog = 'articlestorage'
favicon = 'ghost.svg'

[article]
title = 'README'

[resources.markdown]
path = 'README.md'

[resources.style]
path = 'style.css'

Running after setup

  • 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
    

Features

See changes in the browser on save

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.

Automatically create a table of contents

Just add [TOC] to the first line of the .md file to create a table of contents.

About

Personal static site generator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published