Skip to content

A flask app to help me write blogposts

This blogpost was written in a flask app that looks like this:

CleanShot 2025-03-15 at 19.41.26.png
What the app looks like locally

It's a wysiwyg editor of sorts that I wrote with Claude in an attempt to make it more fun for me to write stuff on my blog.

Before

My blog runs on mkdocs (which is great) which means that all of my content live in markdown (again great) but setup meant that I always need to run through a few steps to get a blogpost out.

  • Create a folder
  • Put an index.md file in there
  • Add screenshots to the folder
  • Make sure I reference them correctly
  • Maybe manually write a <figure> tag around the image to make it centered.

So why not try to automate this to make a very bespoke app for my setup? The result is a Flask app that I can spin up in the background and whenever I see something interesting online I can just add a blogpost as if it was a Github issue. It supports markdown and will also show me a neat preview on the side.

After

The best bit? I can click and drag a screenshot into the textbox and it will automate everything from there! Including the <figure> tag!

CleanShot 2025-03-15 at 19.47.27.gif
I get to re-use my clipboard tool! yay!

Everything is converted to a base64 image and the best part is that I can still do everything manually after the fact. There is no CMS to worry about, everything will still just be markdown files all the way down and mkdocs-material can still be scripted to pick it up from there. That also means that I am free if I ever want to do fancy things with iframes of javascript. That's still totally possible.

This flask app is a small change, but one that feels like it already makes the barrier so much lower to actually blog again and share some things that I learn during the day.

Curious?

You can try this approach yourself by taking my code as a starting point. You can find it on this repo.