Simple static site generator built with Python. Convert Markdown to a beautiful blog with templating, asset processing, and modern web features.
- Python 3.8+
- Virtual environment
git clone https://github.com/ujangdoubleday/blog.git
cd blog
make installEdit config/config.yaml:
site:
title: 'My Blog'
author: 'Your Name'
url: 'https://yourdomain.com'Create file content/posts/<your-category>/hello.md:
---
title: 'Hello World'
date: '2024-10-14'
published: true
---
# Hello World!
My first post.make serveOpen http://localhost:8000
make build # build only
make serve # build + serve
make serve PORT=3000 # custom portSetup .env with Pinata credentials:
cp .env.example .env
# edit .env with your API keysDeploy:
make deploy # deploy to IPFSEach deployment automatically:
- Converts CID to v1 (silent)
- Deletes previous deployment from Pinata (saves storage)
- Saves snapshots (current & previous) in
snapshots.json
Update DNSLink automatically after deployment. Default: false
Set in .env:
CLOUDFLARE=true
CLOUDFLARE_EMAIL=your-email@example.com
CLOUDFLARE_API_KEY=your-api-key
CLOUDFLARE_ZONE_ID=your-zone-id
CLOUDFLARE_HOSTNAME=your-hostname-idWhen enabled, deployment will update Cloudflare DNSLink to point to the new IPFS CID.
Full docs: https://developers.cloudflare.com/api/resources/web3/
blog/
├── content/
│ ├── posts/ # blog posts (<category>/*.md)
│ ├── pages/ # static pages (.md)
│ ├── templates/ # jinja2 templates
│ └── static/ # assets (scss, js, images)
├── core/ # core modules
├── scripts/ # build & deploy scripts
├── config/ # configuration
└── output/ # build output
---
title: 'Post Title'
date: '2024-10-14'
author: 'Name'
description: 'Short description'
tags: ['python', 'blog']
published: true
---
# Content
Write your content in Markdown...---
title: 'About'
slug: 'about'
---
# About
Page content...make test # run tests
make test-cov # with coveragepre-commit install # install hooks
make check # run lint + test