These days, I see people always extolling the benefits of using Static Site Generators (SSG) for building static sites. Why would I not just write the HTML/CSS myself? What’s the advantage of using an SSG, such as Gatsby?
I’m using Gatsby for my own blog. Here are some benefits I can share based on my experience.
Usually, people use SSG writing their blogs. You have a template or skeleton as the layout for all of blogs, and you have something called
Content Managing System to manage your articles.
You can write your template however you want. You can build your own framework with pure HTML/CSS/JS. Or you can utilize the existing frameworks to skip the unnecessary stuff. GatsbyJS or Hugo allows you to write code if you have experience whereas WordPress and Wix allows you to design your blog with UI interactions.
Next is the content. Content can be composed in their own way. There are sites that let you design your content with UI just like Word. WordPress and Wix intergrate their own CMS so that non-experience can develop their whole blog fully. Or, you can go with Markdown (like you type in this post) and manage your own content. you can do it with Gatsby. It also integrates very well with CMS.
The most important part is how you link your layout to your content. WordPress and Wix will do it for you. You pick a theme, you write your own content and you publish it. GatsbyJS provides their own official plugins and gives you the full responsibility. How you want to link, how you want to navigate, what you put in the metadata, etc.In a simpler way, you can generate an HTML page based on your markdown files. But before generating the HTML page, GatsbyJS will wrap it with the layout you provide to generate a full page (layout + content).
If that is your intention, then yes, you should use SSG. If your intention is just a landing page, an about page or pages are not relevant to each other, you can just use HTML/CSS/JS, no need for the hassle.
In short, you use such frameworks or tools when they give you an advantage in time or cost over not using them. What these advantages are and whether they are applicable to your specific requirements depends on the specific tools and is beyond the scope of this site. Check the documentation of the various options, try out some examples, and come to your own conclusion.