Skip to content
A static site generation tool written in Python for the purpose of easily creating blogs
Python HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
content
css
posts/hello_world
templates
.gitignore
README.md
build.py
index.html

README.md

Python Static Site Generation Tool

This is a tool I originally wrote to procedurally generate my own personal blog. I realized this could be a helpful tool for people who want to focus on their content rather than the technicalities (while still being able to claim they wrote their own website).

As of right now this tool does not include styling, however that is something I am looking to add in the future. I've tried to keep the structure of the pages as simple as possible to make it easier to add your own styling.

Instructions

  1. Clone this repository on your local machine
git clone https://github.com/ethanzh/static-site-generator.git
  1. Navigate to the content directory where you will find a hello_world.md file. This contains the template you will be using to write your content. Take note of the JSON-esque metadata stored at the top.
  2. After writing your content, navigate back to the root folder and run python build.py (note, you may need to run pip install markdown in order for the script to run successfully).
  3. Your files are now generated! index.html contains HTML for your home page which contains links to each blog post.

These generated files can be served from a web server of your choice. I recommend using GitHub Pages due to its sheer simplicity.

You can’t perform that action at this time.