Thoughts on clojure, linux, security and Bitcoin's 0.1v (Satoshi Nakamoto's Design) in an era of artificial intelligence
When migrating articles from other static site generators (like Hugo, Jekyll, or standard GitHub-flavored Markdown) to Quickblog, you might run into a jarring visual bug: your post titles show up twice at the top of the page.
Here is why it happens, and how to programmatically fix it across your entire codebase.
In standard Markdown styling, it is natural to start your file with an H1 header matching your title:
Title: My Great Post
Date: 2026-06-14
---
# My Great Post
This is the content of my post...
However, Quickblog uses a rendering template (typically found in templates/post.html) to dynamically construct your posts. If you inspect the default template, you will see it already wraps your metadata {{title}} in an H1 block:
<h1>
{% if post-link %}<a href="{{post-link}}">{% endif %}
{{title}}
{% if post-link %}</a>{% endif %}
</h1>
{{body | safe}}
Because Quickblog inserts the title dynamically, any # Title header you manually write inside the Markdown body will result in a double title on the compiled HTML page.
Instead of manually editing dozens of markdown files to delete the redundant H1 header, you can clean them all up instantly using a quick Python regex script.
Run this command in your repository root:
python3 -c '
import glob, re
for f in glob.glob("posts/*.md"):
with open(f, "r") as file:
content = file.read()
# Remove the first H1 header line and any trailing empty lines immediately after it
new_content = re.sub(r"(?m)^# .*\n\n?", "", content, count=1)
with open(f, "w") as file:
file.write(new_content)
'
This script:
posts/ folder.(?m)^# .*\n\n?) to find only the first occurrence of an H1 header (# ) at the beginning of a line.Once completed, run bb quickblog render to rebuild the pages, and the layout will render perfectly with a single title block.
Published: 2026-06-14
Tagged: simplicity automation clojure web-development