What's the difference between a static site generator vs a content management system?

Hello, I know that both a SSR and CMS is thing that we can build with software without necessarily high level of domain knowledge to do so. I also understand that SSR, well are just static websites just like it used to be back in 1990. Now with CMS, this provide us with the flexibility of creating "new content", what do we mean by that? It's like creating blogs for a blog website? If so, we would need to store everything in a database, no? So we would need a server etc? Can someone elaborate pls
18 Replies
ἔρως
ἔρως3mo ago
a static site generator generates a static site, usually done based on markdown files but not always a cms is a content management system, which is used to produce the content and manage it - including generating the code for the static site generator in short: - static site generator = html files created from content - cms = wordpress
13eck
13eck3mo ago
Not sure what else to say that Epic didn't…and that is already in the name. One generate static sites…the other is a system that manages content… Often they're used together. The CMS manages the content that is then generated into a static site.
ἔρως
ἔρως3mo ago
they only touch on "content" yup you don't have to, but you can
Faker
FakerOP2mo ago
a content management system, it also generates code, right? does it generate the whole website?
13eck
13eck2mo ago
No, it manages the content The SSR or SSG makes the content
Faker
FakerOP2mo ago
ah ok, I thought it generates the website by itself, so it's acts as the server and database that we would normally use to build a blog website for e.g where we would create blogs etc ?
13eck
13eck2mo ago
The CMS only manages the content. You need something else to generate it. Like a static site generator or a server side renderer. WordPress, for example, is both a CMS and a SSR. It both manages your content as well as renders the content on each page request—hence SSR, or server side render But you can use WP to just manage and use something else like Hugo to generate your content for you I believe it's called "headless"
Faker
FakerOP2mo ago
yeahh headless saw that term like it decouples front end and back end
13eck
13eck2mo ago
In order for a system to work it needs both a CMS to manage the content as well as a SSR, SSG, etc to render/generate the content. You can get both in one package or get bits and pieces from many different services/platforms
Faker
FakerOP2mo ago
yeppp I see, last question though, don't want to dive too much into implementation details in how a CMS work but let's say we want to generate a post or whatever, the CMS need to store it somewhere, right? where does it store it? There is where CDNs come into play?
13eck
13eck2mo ago
No, a CDN is for the final product. CDN = Content Delivery Network. You don't need to deliver the pre-generated content but the post generated content Usually the CMS stores data in the local file system and uses a DB as a step of indirection. For example, your CMS may show you a list of blog posts you've made by their titles. The DB stores the title as well as a file path for the pre-rendered content. Usually markdown but could be any number of non-HTML formats. Then, when you click on "edit this post" the DB gives your backend the file path which is then opened and sent to the user to modify. Once modified, the backend replaces the old file with the new one. If it's a SSG then the updated page will be queued for final generation.
Faker
FakerOP2mo ago
ah ok I see so really, a CMS is just a service that allows us to modify things from our back-end?
ἔρως
ἔρως2mo ago
it's headless, yes. you can also use it just to generate json instead
13eck
13eck2mo ago
Yes and no. It’s kind of a wishy-washy term that is used for a few things. But the basics is that it helps you manage your content better than just files inside folders. Some also create the final website, some don’t.
Faker
FakerOP2mo ago
yep I see, I will have a better idea of how they work if I work with but I have a nice overview now, thanks !
Ray
Ray2mo ago
You know how you can post things on twitter and discord and what have you, and you don't have to directly change any files or modify any database entries in order to do it, and the site just takes your input and updates itself? That's basically what a CMS does. It's a software that's programmed to do those things for you after you've provided some content to it somehow, usually via a form. What happens after you've given it some data depends on the CMS--maybe it gets turned into actual webpage files in a directory, or maybe it uses dynamic templates that swap out data based on context, or maybe it's entirely something else, or a mix of things. It could be anything. They're pretty neat, I'd definitely recommend exploring different ones if you have an interest. You'll learn a lot fast. Everybody else here is also right, I'm just in the process of creating a CMS myself right now and thought I'd chip in lol
Kingpin
Kingpin2mo ago
cms = wordpress? Eew.
ἔρως
ἔρως2mo ago
it's an example that's well known

Did you find this page helpful?