Skip to main content

Dead simple static blog generator using markdown files

Project description

BlogTuner 🎵

License: MIT

Blog every damn day, no excuses.

BlogTuner is a ridiculously simple static blog generator that converts Markdown files to HTML with zero fuss. No complex configurations, no steep learning curves—just write and publish.

✨ Features

  • Dead Simple: Convert Markdown to HTML—that's it
  • Lightning Fast ⚡: Generates your entire site in milliseconds
  • No Excuses 🙅: Removes all barriers to daily blogging
  • RSS Ready 📡: Automatically generates an Atom feed
  • Markdown Power 📝: Write in Markdown, publish as HTML
  • Smart Defaults 🧠: Sensible defaults with minimal configuration
  • Draft Support 📋: Mark posts as drafts with frontmatter or naming
  • Date Flexibility 📅: Use frontmatter dates or file timestamps
  • Smart File Organization 🗃️: Git-aware file renaming to standard format
  • GitHub Pages Ready 🚀: Generate static HTML perfect for free hosting

🤔 Motivation

Some folks such as Simon Willison have convinced me to start blogging my thoughts. I wanted to keep things simple—just a dumb set of markdown files should be enough to create a super simple HTML blog.

Even with great tools like Zola, Hugo, and Pelican available, they felt too complicated for what I needed. I wanted the minimal expression of simplicity. Hence, BlogTuner was born.

The idea is to keep your markdown files in a repo, generate HTML with BlogTuner, and deploy to a service like GitHub Pages. As simple as that.

📦 Installation

The recommended way to use BlogTuner is via uvx (by the way, if you haven't heard about uv you should read about it):

uvx blogtuner build source_dir target_dir

If you prefer to install it:

uv pip install blogtuner

You can use the traditional pip workflow without uv as well.

🚀 Usage

Basic Usage

# Create a new blog directory
mkdir myblog
cd myblog

# Create your first post
echo "# Hello World" > first-post.md

# Generate your blog
uvx blogtuner build . _site

Smart File Organization

BlogTuner automatically renames your files to follow the pattern YYYY-MM-DD-slug.md.

NEW: Git-aware file renaming! 🎉

When BlogTuner normalizes your file names, it now intelligently detects if the file is part of a Git repository:

  • If the file is tracked in Git, it uses git mv to rename it, preserving your Git history
  • If not, it falls back to a regular file system rename

This makes BlogTuner play nicely with your Git workflow while keeping everything organized.

Frontmatter

Posts can include TOML frontmatter at the beginning of the file (if you don't include it, it will be generated during the first run):

+++
title = "My Awesome Post"
pubdate = "2024-03-28"
draft = false
slug = "custom-slug"  # Optional, defaults to filename
+++

# My Awesome Post

Content goes here...

Blog Configuration

Create a blog.toml in your source directory (it will be created on the first run if you're lazy like me):

name = "My Awesome Blog"
author = "Your Name"
base_url = "https://yourdomain.com"
base_path = "/"
lang = "en"
tz = "UTC"
footer_text = "Powered by <a href='https://github.com/alltuner/blogtuner'>Blogtuner</a>"

🛠️ Features in Detail

Post Processing

  • Automatic Metadata: Extract frontmatter or use defaults
  • Date Handling: Parse dates from frontmatter or use file timestamps
  • Drafts: Drafts won't appear in the index or feed
  • File Normalization: Files renamed to YYYY-MM-DD-slug.md with Git awareness

Site Generation

  • HTML Generation: Clean, simple HTML for each post and index
  • Feed Generation: Atom feed for syndication
  • CSS Bundling: Simple, clean CSS included automatically
  • Fast Processing: Efficient even for large numbers of posts

🧑‍💻 Contributing

Want to contribute? Awesome! But read this first:

I'm looking for simplicity, not complexity.

The best contributions to BlogTuner are ones that:

  • Make it even simpler to use
  • Remove complexity, not add it
  • Fix bugs or improve performance
  • Enhance the core functionality without bloating it

If your PR adds a ton of new features or dependencies, it's probably not a good fit.

The guiding principle is: "How can we make blogging have even fewer excuses?"

Submit your PRs and let's make blogging simpler together!

🔄 Example Workflow

  1. Write posts in Markdown with optional TOML frontmatter
  2. Run BlogTuner to generate HTML and Atom feed
  3. Push HTML to GitHub Pages or your hosting service
  4. Repeat daily (no excuses!)

👨‍💻 Author

BlogTuner is developed by David Poblador i Garcia as part of All Tuner Labs. It's created by someone who believes blogging should be simple, fast, and without barriers.

📄 License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blogtuner-0.2.4.tar.gz (62.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blogtuner-0.2.4-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file blogtuner-0.2.4.tar.gz.

File metadata

  • Download URL: blogtuner-0.2.4.tar.gz
  • Upload date:
  • Size: 62.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.11

File hashes

Hashes for blogtuner-0.2.4.tar.gz
Algorithm Hash digest
SHA256 f291067839f63ca4368cc096c0b1c819cf849c66d2377c3347df33575d0dc05a
MD5 929986c11a3be1baa17867c75d327ff6
BLAKE2b-256 05e14cda76c41400e5af5a8d7a686c1e0260ba44c5b8661333639217e68720b1

See more details on using hashes here.

File details

Details for the file blogtuner-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: blogtuner-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.11

File hashes

Hashes for blogtuner-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b2f621fbff0298bc9683b5617ca5c778de4a219c1eee28a2f265f9afdf2f5470
MD5 8c94c31902d25a2b40ca401f61c07482
BLAKE2b-256 b8ab9e0cf3ed32c02f7efb975d1948c51bff21bb0c7485b3053058207de4591b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page