Bits of Simplicity

Tag: #LARAVEL

Site Updates: Theme, Markdown, Back-end, Media, and Comments

Published

I've done a bit of work on the site over the long weekend. Got around to a basic theme instead of plain text styles. It support both light and dark styles. It's still simple, but improves the readability. The front-end now supports markdown. Markdown has been on my list of things to-do for awhile. It make formatting easy, and also takes care of links, code blocks and an common way to do image embeds.

Along with markdown I have built out an actual back-end with a post editor. The back-end is also nextjs but it runs locally and talks to the laravel api that also runs locally. The front-end is nextjs but statically exported and pulls posts and pages from the api when building. Another item is media uploads (and embeds thanks to markdown). It gets uploaded to the api from the back-end and then the front-end copies them at build time.

I wanted a way to do comments without switching from a static site. There are a few ways to do that using javascript and 3rd party services, but I had the idea to use Mastodon instead. The way it works is if comments are enabled for a post, at build time it will trigger my @blog bot to share a post. From there I can either boost or quote it to share it with the people that follow @bhhaskin. People can then comment/reply to the post and the next time I build the site it will be pulled down by the api. It does mean there is a lag between commenting on the Mastodon post and when they show up on the blog post, but it is a good trade off.

Categories: