Closed yhoiseth closed 4 years ago
Hey, thanks! I appreciate the feedback!
When I started building Charge I had the intention of converting all my sites (which previously used Middleman) to it, including my blog. So I slowly added generic features until I was able to convert most of my sites, but the blog turned out to be the last and the hardest.
The problem is that a blog is really more of a set of patterns and conventions around how a static site should work and display content. And it gets even more complicated because everyone has a slightly different idea of how a blog should work. So you invariably wind up building a tool with a lot of configuration (posts go in this folder, URL paths look like this, etc). Which is what most people want from the tool they’re using for their blog, but in the case of Charge is sort of antithetical—the whole point of Charge is it’s no-configuration.
I thought about it for a bit and came up with some generic features that I thought would make it possible to build a blog. I even converted my blog to use Charge for a hot second. It has all the usual suspects—an index page, permalink pages, an archive page, pagination, a sitemap, RSS, and even a JSON feed.
But I switched it to Gatsby a short time later. It’s not that Gatsby has some special features for blogging or anything like that. Gatsby actually takes a similar approach to Charge and gives you an abstraction that allows you to build any type of site you want, including a blog. But it does have some general features that I wanted to take advantage of. Like its image handling. The gatsby-image package is really something—I wish there was a generic version that could be used in other frameworks. Also the ability to cache remote images/files is really nice. It made integrating images from Unsplash a breeze. And a few other small things. That said, I don’t want to make Gatsby seems like the perfect solution. It is extremely flaky and buggy. When things don’t work I have no idea why, and often running the same command again and/or clearing the cache fixes it, and sometimes not 🤷🏼♂️ It’s also extremely complex. I don’t think building sites with it is fun or easy. It just made sense for me in this particular case.
So to come back around, can you use Charge for a blog? Yes. But whether or not you would want to really depends on what your blog is like and what sort of development experience you’re looking for. I plan to add some notes to the docs about this but I’m not sure I’ve quite figured out the right way to explain it yet.
I hope that helps!
Thanks for the insightful answer. You’ve clearly experimented with and thought a lot about this, so I don’t know how much I have to add. The only thing would be if you have considered themes or plugins — it could be a way to keep Charge itself simple whilst allowing for more advanced use-cases like a blog.
I plan to add some notes to the docs about this but I’m not sure I’ve quite figured out the right way to explain it yet.
Yeah, I think this is a good idea — it would save users some time. How about something like this below “How is Charge different from GatsbyJS?” on https://charge.js.org/?
What Charge is not
Charge is not a full-featured blog generator like Jekyll. You certainly can make a blog with Charge, but it doesn’t come with features like pagination, tagging and RSS feeds. For an in-depth discussion on using Charge to make a blog, see issue #806.
I've taking an interest in Charge after having played with a bunch of other static site generators and this one seems, at least at surface level, to be really nice. Yes, it's missing some features of others but I think that is something that could be added via a smartly developed plugin system. Who knows?
Hi,
Thanks a lot for making and sharing Charge. I find it elegant and beautiful.
Spot on. I turned to a Nikola, a Python SSG. But I miss JSX, so it would be fun to try to rewrite my website in Charge.
However, it looks like I would have to write a fair bit of code to replicate the features of my existing bootblog4 site — e.g. tagging, post lists and RSS. I can’t find much in the way of guidance to set this up. So, I’m hesitant to give Charge a try.
This is not a complaint or anything like that. I just wanted to offer a perspective from someone who almost started using Charge — in case it’s useful.