I don't know if this is clever or not, but it was practical for me: I wanted to have some basic sanity checks on all public (i.e. non-log-in) pages of a site, so I used wget to mirror it. What I was really after was the wget progress output so I could get a list of all the page URLs. I then used that to drive Watir to hit every page and a) check for any 404 or such errors and b) take a screen shot and save it off.
I could then fire up an image browser and quickly see if any pages looked wonky ( missing or misaligned images images, crappy text layout, etc.).
the point is, that the pages are pre-rendered to static *.html files and can be served by a lighttpd or apache much faster and without any dependencies (ruby for example)
Besides speed, static site generators solve a security vs. convenience issue; most dynamic CMS systems are more pleasant to use (especially for casual users) than Jekyll or Nanoc, so the ability to run one internally and pickle it up to static HTML files makes it easier for people to front-end their companies with static files instead of error-prone dynamic web apps.
If you can get away with static content for your public facing website, or at least most of it, I think it's generally worth it for you to do that.
8 comments
[ 3.1 ms ] story [ 19.5 ms ] threadEDIT: for bonus points, cd into your wget-created mirror, fire up an http server with
Then check for any broken links with wget is cool.Ultimately though, correct use of cache headers and varnish or similar gives you the same effect automatically, if you're just looking for speed.
I could then fire up an image browser and quickly see if any pages looked wonky ( missing or misaligned images images, crappy text layout, etc.).
wget is very cool. :)
[1]: http://packages.python.org/Frozen-Flask/
If you want the public folder to be the root, you can make it in two lines:
If you can get away with static content for your public facing website, or at least most of it, I think it's generally worth it for you to do that.