JAMstack with Stackbit, Forestry, Jekyll and Netlify

Aldo D'Aquino
7 min readApr 26, 2020

TL; DR

Stackbit is fine if you want a modern and static blog, in less than 1 hour, without web programming knowledge. It’s something like WordPress, but better, newer and a bit less advanced.

But if, as for me, you know how to build a website and you are looking for something you really own, with a minimal, ordered your way repository, without a flood of commits all with the same message that means nothing to you, in that case you probably are not looking for this solution.

How I got here

So, in August 2019 I decided to open a blog.

So, I decided to open a blog.

And I decided this time I must not use WordPress.
Don’t get me wrong, I love WordPress because it’s easy to use for everyone, even for those with no computer skills, but the performances are not the best, and customizing a WordPress theme is not such an exciting thing.

In this way I would have gotten something more under my control, linear, with understandable code and easy to customize.

I opted for a more modern solution. A static blog, written in Markdown, easy to be deployed like… everywhere.

To be honest, I always wanted to try a static site generator, and that’s probably one of the reasons I decided to (re)start a blog.

I have evaluated some alternatives, including Jekyll, Hugo, and Gatsby, and I end up choosing Jekyll, mainly for its GitHub Pages integration and because I find Markdown convenient to write simple pages like posts, and it seems that Jekyll loves Markdown as much as I do.

After googling a bit for a theme and for some hint about an easy configuration, I decided to use my old Stackbit Beta invitation (in August Stackbit was in closed beta). It’s been a while since I wanted to give Stackbit a chance and I thought it was the right time. After all, I would maintain the flexibility of Jekyll with automatic management, right?

Wrong.

But this time it was my issue, not Stackbit.

What Stackbit is

Probably the problem was that it wasn’t so clear to me what Stackbit really is. I wasn’t able to find many opinions or detailed tutorials about Stackbit. And I ended up hoping that it will be exactly what I wanted, but it wasn’t.

Stackbit is a JAMstack manager, but its work is to link different services together.

Stackbit setup walkthrough

Themes

You start from choosing a theme. Well, choosing… In August there were only 14 themes available, and a few scheduled as coming soon. Now there are 14 themes, and a lot scheduled as coming soon.

The available themes do not allow a great choice, but I appreciated that they covered a great variety of site types: blog, portfolio, multi-page site, home with blog, single page, mobile-centric website, and so on.

The good news is that it’s possible to use your own theme, the sad news is that you must write it yourself using Uniform and Unibit.

Yes, that’s right, you don’t just need to find a nice theme, you have also to modify it to make it work with Stackbit.

To be honest, reading the docs it doesn’t seems too complex, but I was determined to put a blog online as quickly as possible and I decided to rely fully on Stackbit, using one of the ready-made themes.

One thing that is not too clear is that it is not possible to change the theme once chosen (or at least I did not succeed). This is rather limiting: if I wanted to update the theme of my blog, I would have to create a new one and migrate the contents?

Site generator

After choosing a theme is time to choose the static site generator. The three option currently available are Jekyll, Hugo and Gatsby. VuePress and Hexo are the nexts and Next.js and Gridsome are coming soon.

I opted for Jekyll, hoping for a GitHub Pages support.

Nope.

No GitHub Pages, yet.

CMS

Third step: how to manage your contents. The content management systems choice was a bit wider: Forestry, Netlify CMS, Contentful, Dato, and now also Sanity that was flagged as “Coming soon” in August. Prismic is the next, while Strapi and oddly Ghost (sigh 😢) are missing, but they should arrive soon.

I chose Forestry because it was among the most used. I searched for some comparison with Netlify CMS, but without success, so I preferred to keep myself on the classic.

In hindsight, Netlify CMS would probably have been a better choice: just like Netlify itself, it has had many improvements in the past few months.

It’s interesting that you can also choose to not have a CMS and eventually connect it later, manually.

Deployment

The sore point. Actually, you can’t choose.

Your repository can be hosted on GitHub, GitLab and BitBucket, but GitHub is the only one available at the moment. So, you like GitHub, or you love GitHub. That’s it.

The “build + deploy” section is even worse. The choice is between GitHub Pages, GitLab Pages and Netfly. But, again, Netfly is the only one enabled. Since you like GitHub (otherwise you would have left at the previous point) you may also like GitHub Pages. But no, you can’t. Not yet.

However, we must consider that Stackbit is still in beta. A too long beta to be honest, but however its low choice is excusable.

Also, I have to say to Stackbit, since I really enjoyed Netlify, to the point that I decided to move on Netlify also my website (which is detached from the blog).

Conclusions

The thing that disappointed me most is the impossibility of modifying the stack once created.

Doing it by hand (the old way, by acting on the code) shouldn’t be complex, but it requires you to give up Stackbit, and reconfigure the services by hand, which we probably don’t want to do if we chose Stackbit.

Otherwise we can create a new stack, duplicating the previous one, and change the theme, the git provider or the build and deployment service. Then we must manually migrate the contents and finally it should work. I’m not sure that will be so easy also in case we change the CMS or the static site generator. Especially in this latter case the post migration will probably require more attention.

The thing is that these operations should be performed by Stackbit itself! Otherwise, why should it be convenient?

My experience

I found Stackbit fine if you want a modern and static blog, in less than 1 hour, without web programming knowledge. They do what they promise.

But in my case, I was looking for something that helps me in managing the JAMstack, with me, not something that manage it for me.

The other thing that does little for me is the fact that the theme was already ready. I should have chosen to use a custom theme. In this way I could organize the repository on my own, always according to the guidelines, but in a way that satisfied me (and my autism) more.

After finish the creation of my blog in August, I immediately thought that I will recreate it from zero, creating a theme by myself (for Jekyll, without using Uniform), using GitHub Pages instead of Netlify, and using the ready-to-go GitHub Action for the build process.

Instead, eight month later I switched to Medium. But this is another story…

Anyway, still appreciate static site generator, and I will use them again in the future, maybe to update my website without having to change the HTML directly.

Also, I liked Stackbit, and recently I recommended it to a friend with some minimal computer skills. Before trying it, I would have probably recommended WordPress, like the others.

I’m just saying that it doesn’t feat my needs. And that is not yet mature, obviously, because it is in beta.

Forestry CSM

My Forestry experience is not related to Stackbit, hence I decided to talk about it separately.

IMHO, the Forestry editor is a bit poor. I wrote a couple of articles with this editor and I immediately felt some of these lacks, in particular:

  • The impossibility to set an anchor link: you can do it manually (thank you Markdown) but where is the beautiful UI option?
  • The impossibility to add a video: you have to upload the video on GitHub manually, and then add it (manually, again) writing the HTML by yourself. Why the editor can’t just upload it for me?

But the thing that has annoyed me the most is that doing the blog setup required 28 commits from Forestry, without publishing any article. This is the main problem about Forestry for me. Every time you want to change settings page you have to save. And every click on the save button is a commit. If you simply don’t care it’s fine, but I was trying to keep the commit history clean, and I found it annoying. I would have preferred a solution in which also the settings were saved in local storage and committed only at the end.

A better management of commits would be with branching, but you must set up it manually. For example, if Forestry pushes on a branch, you could build this branch for a real-time preview, and then squash merge into the master for the deploy.

I’ll evaluate this configuration for future projects, but I’ll probably opt for a local CMS, and then manually commit my changes. Or even skip the CMS directly, edit the blog template manually and write posts in plain Markdown with VS Code.

The last word

I like the JAMstack, I like Stackbit too, as a WordPress substitute for my friends, but it doesn’t fit my needs. I’ll give static sites’ CMS a second chance, starting from Netlify CMS.

So why Medium? Because after some years spent in building and destroying self-hosted blogs, I decided to try an external solution, where I could simply publish something every now and then, without having to update plugins or dependencies.

I still have other blogs, managed with some friends, and I’ll soon start play with SSG there.

--

--

Aldo D'Aquino

🔗 https://ald.ooo — 👨‍💻 Infrastructure Engineer @ BendingSpoons