What is a static website generator?
A static site is a collection of pages contained in basic HTML files. A static site generator is a compromise between using a hand-coded static site and a full CMS. You generate an HTML-only website using raw data such as Markdown files and templates. The resulting build is transferred to your live web server.
An Introduction to Static Site Generators article was published a few years ago. The basic concept has remained constant. It explains the popularity of static site generator. It also help people of all skill levels understand exactly what static site generators are, acknowledge their advantages, and understand if their limitations are a deal-breaker or if, on the contrary, they can be overcome.
How static sites work?
The proposition of a static site is to shift the heavy load from the moment visitor’s request the content to the moment content actually changes. Using a news kiosk metaphor, think of a scenario where it’s the news agencies who call the kiosk whenever something newsworthy happens.
How dynamic sites work?
When a visitor gets to a website (the kiosk) expecting the latest content (the news), a server-side script (the operators) will query one or multiple databases (news agencies) to get the content, pass the results to a templating engine (the scribble) which will format and arrange everything properly and generate an HTML file (the finished newspaper) for the user to consume. Static sites would simply provide HTML and CSS without any database interactions. There are advantages and disadvantages to static sites. These are outlined below.
Advantages of Static Site
- Version control for content
- Less hassle with the server
- Traffic surges are more easily addressed
Disadvantages of static Websites
- No real-time content
- No user input
- No admin user interface
Switching to a static site can potentially save you time and money, as it requires less maintenance and less server resources. They’re reliable, scalable and can handle high volumes of traffic quite well.
10 best static site generators
Static site generators are command-line tools that shift the creation of the final HTML page forward from the point the user requests it to the point you write the content. When you make an update, you build the new page, which can then be served as-is to every user who requests it. This offers several advantages. Performance will be greatly improved compared to a dynamic site, since serving static HTML and CSS has a very low footprint. Your server-side setup will be much simpler, which also means fewer security worries. Here is a link to the 10 best static site generators (and additional information about each). These are listed below as well for your convenience.
To learn more about static site generators, we recommend:
- Why use a static site generator?
- What is a static site generator?
- Why do people use a static-site generator?
- Why Migrate from WordPress to a Static Site Generator?
- Guide into Static Site Generators
Have you used a static site generator? What were your experiences (positive and negative)? As always, we look forward to your comments.