benefits of static sites
Home |
Table of Contents
While each of the preceding features brings with it certain limitations, they also lead to some of the primary benefits of static sites:
- Performance
There is no server-side processing and no database to connect to, meaning that there is nothing to slow down getting a static page from the server to your end user. This also means that there are no bottlenecks that might cause slowness or outages should you encounter a significant traffic surge.
- Hosting
Since no server-side language is required, hosting requires no complicated setup or maintenance, making it cheap and easy. In fact, there are even free options, like GitHub pages or Surge, for instance (we’ll explore deployment options in a later chapter).
- Security
There are no server-side language issues to exploit and no data‐ base to hack. Basically, as long as the files on your host are secure, your static site is secure.
- Content versioning
Since your entire site, from configuration to content, is file-based, it is very easy to keep all aspects of it within a version control system like Git. This can be especially advantageous for things like documentation that you may want to allow commu‐ nity contributions, for example, using pull requests on GitHub.
Despite these benefits, static sites, even with the help of a static site generator, are not the solution for every type of site. In upcoming chapters, we’ll discuss more some of the limitations of static sites and the types of sites these solutions are best suited for.
================================================
1 TOOLS
Index of static site generators
https://staticsitegenerators.net/
HUBLO https://github.com/pyr/hublo
- python-pelican - blog aware, static website generator
- pelican - blog aware, static website generator
- pelican-doc - blog aware, static website generator (documentation)
Jekyll - import from wordpress http://import.jekyllrb.com/docs/wordpress/
1.1 jekyll (ruby)
gem install jekyll jekyll new [project_name] cd project_name jekyll serve #http://localhost:4000
Jekyll resources http://developer.telerik.com/featured/getting-started-with-jekyll/
http://code.tutsplus.com/articles/building-static-sites-with-jekyll--net-22211
http://jekyllthemes.org/ http://www.jekyll-plugins.com/ http://getpoole.com/
2 What Types of Sites Are Static Site Generators Useful for?
The basic answer to this question is that static site generators are useful for building sites that:
- Focus heavily on delivering content
- Have a low degree of user interactivity
- Update infrequently