A Static Site Generator In Go
Static site generation is really about building an online business presence. You can build a family blog with a free Wordpress site. Your family won't mind it if your site is a little slow. They will wait! Customer won't wait! Research clearly shows customer conversion rates are heavily influenced by how fast your site loads. It takes a lot to make a fast Wordpress site. Even after you do all of that you will still have a site that is far slower than a static site. The very fastest static sites use Content Delivery Network (CDN) like Amazon CloudFront. The servers are placed around the world so your content will be delivered with less network latency. Using a CDN for all of your content is just part of the strategy in maximizing business conversion rates.
Remember this: Google considers site load time to be sufficiency important that they factor it into the page ranking!
The vision for gen-blog/gen-site system is to provide a high speed, high reliability, high conversion rate system for promoting an online business.
Why build a static site generator? A bunch of reasons come to mind:
- Security - static HTML has huge security advantages over a dynamic site with a database. Basically when there is no way to login there is no way for an attacker to do much damage.
- Performance - back in the olden days you could tolerate a server with some PHP or .net on it. Generating dynamic content was an acceptable solution. Today a high traffic site needs to use a content delivery network (CDN) to serve its content. Dynamic content generation and content delivery networks don't mix all that well. Why not just pre-generate *all* the pages and then make all the content static.
- Scalability - You can build a scalable PHP or .net system if you have lots of dollars and lots of folks to work on it and lots of time. Facebook has done it. Using static pages and a CDN still beats it. With hardware scattered across the world serving static content is faster than serving dynamic content. You might say that you don't need that kind of scalability. Most of the time you are correct. What happens when your blog gets listed on digg.com or reddit.com or news.ycombinator.com? If you are trying to attract attention then this is the day that you succeeded. Can your dynamic server stand up to that traffic spike? A CDN based static site can.
- Searchability - Inherently designed to work with Google/Bing and other search technologies. The more dynamic a site the more difficult it can be for search engines to index it. A static site skips all of that.
What do you loose when you go to a static site generator?
- If you really need the thousands of WordPress plug ins, then you should use WordPress. Fact is most people don't use very many, if any, of the plug ins.
I am building a system that addresses the weakness in static site generators. I call it gen-site.
What do you gain with the gen-site system?
- Your posts are kept in a "git" repository. This means that you can access the history of every post back to the beginning of time.
- Backups occur every day. The backups go to Amazon S3 and then to Amazon Glacier. This is essentially a forever backup. We use strong encryption before sending them to S3. Amazon encrypts them before sending it to Glacier.
- Edit your posts anywhere with a modern browser. Note: This feature is still in development. You login to your account on gen-site and use a GUI markdown editor inside a browser. This is a better GUI editor than most current bloging/CMS systems offer.
- Tracking of how frequently pages are accessed.
- Tracking of which browsers are being used to access pages.
Not ready yet - but getting closer
Gen blog is not ready yet - but I have started to push the code up to github. https://github.com/pschlump/gen-blog . I will change this when it is working a little better.
• • • • • •
Author: Philip J. Schlump
Published On: 2013-10-18