blog/data_static/blog_posts/20180630_blog.md
2020-07-13 11:54:16 +02:00

1.3 KiB

This blog is now written in Markdown and synced with OwnCloud

This has been an idea that has been brewing in my mind for a while - create a simple blog that I can write from anywhere, using standard Markdown syntax. Here's the repo of the project.

The blog itself is a Flask webapp with sqlite database that has a BlogPost table. The trick is that the table is acutally synced with flat files in a folder. Each file is a blog post entry. The folder itself is synced by owncloud client which is running as a daemon (currently behind a tmux but will do it as a systemd service soon).

The key of the syncer is in the flatfile_syncer.py file. The sync is currently one-directional - when a file is created/updated/deleted, a blog post is created/updated/deleted. As an admin, you can CUD blog posts from the web interface but these are currently not synced to the file system.

So whenever I start writing a (non-hidden) file in that folder, the contents are created as a blog post. There is still work to be done to make this blog fully functional like perma-links for the blog entries, index, tags and uploading images (probably also synced) but for now it will do.

to be continued...