I spent a few hours making what I consider the Perfect Blogging System. Here’s how it works:
- My blog CMS is a directory of markdown files. This way I can keep my editing platform as Obsidian. It could be any markdown editor though.
- To make a blog post, I add front matter to the markdown file with the following parameters in yaml form: published (true/false), date (yyyy-mm-dd), and slug (string with no spaces). I can optionally add tags, and external_url.
-
I have a script that takes all the content in a given directory (my Obsidian vault), combs through it, derives the date, title, slug, etc, copies it into my Phoenix static folder in a format that NimblePublisher can render (frontmatter in a map format). The script has a couple fancy features, like the ability to create links based on
[wiki style](private-link)
links. It even copies over images. -
When I’m ready, I run the script in my Phoenix app with
mix blog.build
, or preferably my publish.sh script which pushes to main.
Todo:
- twitter embeds
- youtube embeds
- dynamic og images