Skip to content

padraic-padraic/StaticFlask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Flask Build Status

This is a small project to create a Jekyll-like blogging tool using markdown formatted pages and Flask, to be run as a personal blog. As such it also includes py-markdown-math for escaping LaTeX commands in Markdown.

StaticFlask is a configurable, 'batteries included' Blueprint. It's core is based on Flask-Flatpages, an extension that provides flat page markdown support to Flask.

StaticFlask pages are categorized using the file system. Each folder defines a category, and each sub-folder is a subcategory. Each category can be simply configured using a small yaml file, defining the template, and what subcategories/posts to display.

The Blueprint itself can also be configured with a small yaml file. This is used to set the pages and media folder, configure the FlatPages instance, and set other config values in the Flask application.

On registration, StaticFlask sets up the categories and pages, and registers routes:

  • /<path>: Load the category or page at the path
  • /<path>/<page_number>: Load the paginated pages in the category at path
  • /media/<path>: Serve images and other media
  • /static/: Serve CSS and JS and other static files.

StaticFlask also sets up an instance of flask_frozen.Freezer provided by the FrozenFlask extension, and registers generators for building a static site from the resulting application.

Possible Extensions / Refinements

The core refinement I would like is to package StaticFlask and create a simple command-wrapper. This would initialize a directly with config and (skeleton) template files and (optionally) the raw site code, to enable others to create websites with Static Flask.

About

Static File blogging in Markdown w/ Mathjax, using Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published