Migrating the blog to Uniform
19th Oct 2022
This site was born in 2009, that's over ten years now. All this time the content has sat inside the GitHub repository. It started as Markdown files and more recently has moved to JSON files. I have always liked that there are no external dependencies on the content but have found the management of it gets in the way of writing and creating.
Static content archive
Over the years I have investigated other options for storing the content but I have wanted to keep writing in Markdown which has not been widely available. Recently whilst researching integrations for Uniform I stumbled on GraphCMS, now called Hygraph. I really like the Hygraph interface, it is clean and I can focus on the content while I am writing. It also allows simple markdown as well as "Components" which are modular blocks of content. This combination works really well for long-form blog posts and I can use Uniform Canvas for the other areas of the website.
I have had to make the decision, do I migrate all the existing content into Hygraph? I feel like I have three options here:
- Write a script to ingest existing content into Hygraph
- Create a local archive of existing content and merge with new content as requested
- Convert Hygraph data into static files on publish
In the long run, I would like to aim for option 3. This would reduce requests to Hygraph as well as speed up builds. It would also retain the old philosophy of being able to build the website from local files.
That turns out to be a lot of work. It also seems that I will need to implement option 2 anyway so this is what my current goal is at the moment.
Static Pages to Uniform
My site doesn't just hold blog posts, it also has a few pages as well. As there were only a few I decided to move them directly into Uniform Canvas. I converted my old TinaCMS blocks into Uniform Components which didn't take too long.
I have named and mapped all the parameters to the existing React component props so there was very little work to plug in the data.
What I am looking forward to experimenting with
Now that I have this combination of Uniform + Hygraph I am expecting the process of creating content to be more streamlined with less context switching. I can put my mind in "content mode" without having to be distracted by code and infrastructure.
There are also a few Uniform features which I would like to play around with. I have made the effort to tag all my blog posts over the years and I am going to experiment with offering personalised recommendations based on articles a reader might have looked at before.
I have created content inside a few services on the web. Uniform will allow me to compose them together in a simple interface. This will also work towards my goal of being able to focus on content creation.