Skip to content

der2b2/erwin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erwin SSG

Python static site generator for blogs or static pages (built and testet with python3)

Version

Erwin SSG 0.9

Table of contents

Features

  • Templating with Jinja2
  • Markdown Content
  • SASS compiler
  • Twitter and Facebook Cards
  • Simple image processing with automated generation of different file sizes for responsive images with picture tag
  • Pipenv bundled
  • reading time calculation
  • Sitemap generation
  • 3 Types of content:
    • homepage
    • posts (or articles)
    • pages (for static content like about, privacy police or disclaimer)
  • Tags for posts
  • Standard css framework is bootstrap, but can easily be changed to any or none
  • SEO (title and description in markdown)
  • RSS Feed generation
  • Categories for pages
  • favicon and icons: automatic generation of all needed sizes and formats, automatic meta tags
  • Webmanifest

Install

Install pipenv:

pip install pipenv

Download Erwin SSG and change into folder:

git clone https://github.com/der2b2/erwin.git
cd erwin-ssg

Generate and change to virtual environment with pipenv:

pipenv shell

Install dependencies:

pipenv install

Usage

There are four scripts that can be run:

initialize

After installation, initialize erwin structure with standard files:

python erwin.py init

clean.py

Clean the output folder, basically erases the complete output folder to get rid of old files

python erwin.py clean

build.py

This script builds the whole website and stores it ready for deploying into the output folder

python erwin.py build

serve.py

Starts a simple local Webserver for testing. The webserver just serves the stored files from the build script.

python erwin.py serve

Server runs on "localhost:5050"

Structure

erwin-ssg
  /- assets    # all extra data
    /- css     # main.css will be compiled and copied to /output/css, critical_main.css will be inlined
    /- fonts   # will be copied to /output/fonts
    /- js      # will be copied to /output/js
    /- responsive-img  # automatic thumbnail generation for all images in here, stored in /output/img
    /- static-img  # for logos and background images, will be copied to /output/img
    /- static  # other static stuff, will just be copied to /output/
  /- content   # holds the content of the page
    /- pages   # pages as markdown files
    /- posts   # posts as markdown files
  /- templates # holds all templates for the site as html files for jinja
  /- output    # generated by build script, holds the ready to go site

Site Metadata

Site meta data is stored in site_config.ini, entries are commented