More or less, I am used to LAMP (Linux, Apache, MySQL, PHP/Python) as a standard approach to make a website.
However, some of the sites does not get updated so often, and require little user interaction. In these cases, a simpler static website would do.
One way to thing about static website is that it just changes the timing of generating HTML. For dynamic site, HTML is generated from content when user access the page; meanwhile for static site, HTML is generated when content being added or changed.
A quick example is personal blog site. It usually get updated at most a few times a day. And the simplest user interaction would be “drop me an email” button.
There are already lots of projects for generating a static website. Among them the most popular one is Jekyll.
It is very easy to build and deploy a static website (e.g. on AWS). Steps:
- Install Jekyll.
- Choose a base directory. Make a _post directory and add some markdown documents in it.
- Optionally, find a ready-made Jekyll template and extract it to the base directory.
- Call ‘jekyll build’ to build the site. By default generated site is in _site directory.
- Install Apache, and configure it to serve site on the _site directory.
Done. No script, no database.
Since the site is static, you can host it on Amazon S3, without even starting an EC2 instance.
For automation, it is possible to use git hook to re-build the site when there is an update.
Any other kind of trigger would also work, like Dropbox or Email.
For interaction feature, it is also possible to use Disqus for comments.