In my perusing, I noticed a few different options were used by developers for presenting their content. Some people went the hosted route, such as Medium or Dev.to. These sites go a long way toward helping make the blogging process seamless. On top of that, discovering similar topics by others on the site is really easy. Along my developer journey, I have created accounts both on Medium and Dev.to with the latter even having an article or two posted. However, while I enjoyed the simplicity of this option, I didn’t want visitors to have to leave my site to go somewhere else to find the information I posted. I wanted to keep everything “in-house” and use these sites more or less for cross-posting and being engaged in the developer community.
With this in mind, I, for a moment, planned on creating my own blog platform. However, the appeal for this idea died pretty quickly once I considered all the different features I planned/needed to include (not to say I won’t possibly revisit this down the road!). Thus, I knew I needed to find a BYOF (bring your own frontend).
Based just on its sheer popularity as a blog platform, I began investigating Wordpress as a solution, since I had heard they created an API for accessing blog data. After running a few test cases on what I wanted to accomplish as the final product, I found it fell short of what I envisioned. It was around this time that I heard on the Syntax.fm podcast about Sanity.io. From what was shared of it being a content API that connected to whatever necessary frontend, it sounded like a viable option.
I had built my site with Next.js, so the first thing I did was see if anyone had combined Sanity.io with Next.js. And, yep, there was a tutorial and all for connecting the two! Being fairly simple to set up, I walked my way through the tasks figuring I’d be up and running pretty quickly...that was until I got to the end and it didn’t work. A little perplexed, I reviewed my work thinking I had maybe skipped a step. Nope, everything matched. The truth about tutorials is that, while they are awesome at showing someone how to implement or integrate new technologies, they also become outdated the moment they are published considering the speed at which web dev moves. In this case, though the tutorial was not functioning as explained, the source code had been updated. After fixing the missing pieces, everything worked - woohoo!
Of course, once the tutorial ends, the training wheels come up and the joy of experimentation begins. I edited some of the default settings and included a few more input fields that I planned to use when displaying the blog content. I created/deleted/published/unpublished the same post over and over again to get a feel for the program. The Content Studio worked as I’d expect any text editor to do with all the features I desired. And with plugins, both third-party and self-created, I knew that the possibilities for what could be accomplished were pretty grand. Things worked great...until something broke.
I saw in my Content Studio that an update was available for it. Cool! I ran the CLI to install the new packages. Everything went without a hitch. I then entered the deploy command so the update would be live. Crash. Well, that’s weird, let me try again. Crash. Maybe I didn’t run the update correctly. Rerun update. Crash. In having made no other code changes, I couldn’t figure out how I had messed up what seemed like a simple update.
Checking Sanity’s website, I saw that they had a Slack channel. Figuring it was a good place to go for help, I jumped on in and posted my issue. I expected that maybe at some point, someone would get back to me. To my surprise, a member of the support team answered almost immediately. I shared with him some screenshots and explained the problem. He had me try a few commands and we were eventually about to circumvent the error temporarily. He then told me he would pass along my issue to get it checked out further. Within a few hours, I found out that I hadn’t, in fact, broken the CLI, but that a dependency update caused the issue. A few hours later, a patch was issued resolving the problem. From start to finish, it was surprisingly easy to get help. Customer support goes a long way toward helping me decide whether to stay or leave when I run into issues.
Besides the few hiccups, I am really happy with my choice of Sanity.io. It’s the headless CMS I had been trying to find and seems to be only getting better. In some ways, the platform is still pretty young (made publicly available in late 2017). I imagine that a lot is still planned for the future making me excited for what is to come.