Panzercraft

New Static Site Generator - Gridsome

New Static Site Generator - Gridsome

Been a few years since I've updated this blog. I'm hoping to write a little bit more here in the future, but first I needed to do bit of upgrading.

To be honest, I'm not the best developer out there. I have to rely quite a lot on Googling to solve problems. Using an older, inactive and unpopular platform makes it harder to find solutions. It seems that Wintersmith platform I used earlier, isn't in active development anymore. That's why I wanted to switch to something newer and more popular.

New and hip static site generators

The static site generator landscape has shifted a lot since 2016. Some of the old giants, like Jekyll, are still relevant, but sites are becoming more app-like now. Majority of the new ones use JavaScript and are build on libraries like React and Vue. I have no experience using anything that fancy.

Selection criteria

The bazillion possible platforms can induce an acute case of analysis paralysis. There's so many of these nowadays. I made the decision based on these criteria:

  1. I didn't want to learn a new programming language. There's still plenty of tricks in JavaScript for me to learn. I don't particularly like JavaScript, but it's very popular. As established earlier, this helps my problem solving.
  2. Simplicity. I didn't want a platform that can do everything. I have no need for eBook exporting or documentation websites. I steered away from the systems that placed emphasis on creating apps, instead of blogs.
  3. React vs Vue. I looked at code samples of each and Vue seemed to be more familiar to me and have less boilerplate code.

These lead me to choose Gridsome in the end.

Enter Gridsome

I stumbled upon Gridsome in a Reddit thread about static site generators. It's relatively new one, but gaining traction. Gridsome markets itself as being easy develop, blazing fast and SEO friendly. It doesn't care where the data comes from, as it's powered by GraphQL. All the old posts were already in markdown format, so it was easy to import them to Gridsome via GraphQL.

This site by nature is quite image heavy. Out of the box, Gridsome provides optimization and lazy loading of images. I don't have to rely on Grunt anymore to handle that stuff. I still might need to add some full screen image script, as most visitors of this site are still on desktop. On mobile, the images fill the screen anyway.

A comment about comments

During the past years, this site has received zero comments in total. This is to be expected, as the traffic is quite low. Before I used Facebook comments, but it come bundled with trackers. I was basically giving Facebook data about all visitors, but getting nothing in return. So I removed the Facebook comment system.

Still, if someone want's to leave a comment it's good to give them the opportunity. Given the non-existent volume of comments, I didn't want to hassle with self-hosting. Nor did I want to pay for comment system or have one that display ads. Quite a pickle.

After some research, I found CommentBox. Their tagline is "No ads. No Tracking. Just Comments." CommentBox offers 100 comments per month and unlimited page views for free. This will be more than enough for me for the foreseeable future. Setting up only took about 5 minutes. Only question is how well it will handle spam. Time will tell, but so far so good.

Was it worth it?

GitLab Google at least seems happy with the increased speed of the site. It doesn't even make sense to compare it to the previous one. I've yet to bother with the Progressive Web App stuff, even though Gridsome supports it. I just don't think many people will want to install this blog to their home screen or desktop.

I've spend quite a bit of time fiddling with the technology at this point. From SEO point of view, it would have been better to spend that time on creating content for the blog. From personal point of view I've learned some new stuff along the way, which is always a plus.

GitLab One such thing to mention, although not related to Gridsome, is I'm now using GitLab more. GitLab's servers now build this site, upload it to S3 and clears both CloudFront and Cloudflare caches. That's less logging in and less pushing of buttons. In theory this should allow me to focus more on creating content. In practice.. well.. I'll probably keep perfecting the settings instead of making content.

I realized after writing the last paragraph that it's eerily similar to the one in my previous post about Wintersmith 😄 History repeats itself I guess.

More from the category: Websites

More with the tag: Static sites