Creating Microservices for my Static Website

As I mentioned in my DevOpsDays London talk, Overengineering Your Personal Website - How I Learn Things Best, I want to overengineer my personal website a little bit more than it already is, and convert it into a fully fledged orchestration layer.

https://www.jvt.me is primarily used for mostly technical blogging, but I also use it a little bit to show off who I am and some of the things I work on. But that means there's a lot of content in-site that doesn't get touched as often, and then brings extra burden to update it as it needs to be. This includes my Talks, Projects and Blogroll, as well as possibly even the About page and my social connections + contact means.

I'll be moving them out into a separate "microservice" API, wherein I'll be consuming the data from that API to build the site's content for those pages. This is partly the model of the JAMstack, where I'll be adding the ability to refresh the content client-side if you have JavaScript enabled. However, at the core of this is ensuring it can be consumed without JavaScript enabled, for the many clients who may not want to, so the content must also be available at build-time to build the site.

I've actually already converted the Blogroll to consume the Blogroll API, which now pulls from https://blogroll.jvt.me/blogs/index.json using the Jekyll plugin jekyll-get. It'd make more sense to serve from https://blogroll.jvt.me/blogs/ rather than needing the nasty /index.json, as well as looking at finalising the API schema. This currently doesn't have the ability to refresh client-side, which is an issue on the backlog to tackle soon, but it's currently "good enough" as a proof of concept.

One great benefit of moving to this model is that I can also avoid needing to check out the repo locally, but can instead use Netlify CMS as a static site CMS to in-browser edit the files in a structured way. This will make it really easy when I have the API in full force, and am able to update resources as-and-when I want.

Playing around with the Netlify CMS has been on my list of things to do for a while to build into a number of the sites within Spectat Designs to enable our customers to edit their sites much more easily.

The final great thing about this is that it gives pure programmatic access to this data around me, so anyone can consume this data for whatever means they want!

You can follow along on my issue tracker's label microservices-site.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#announcement #jamstack #microservices #www.jvt.me #spectat-designs #netlifycms #jekyll.

This post was filed under articles.

Has this content helped you? Please consider supporting me so I can continue to create content like this!

Related Posts

Other posts you may be interested in:

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.