Middleman is a static site generator using all the shortcuts and tools in modern web development. Despite already being happier with the more minimal and personal design, I wanted to compare page load times between the old and new sites.Middleman - Makes developing websites simple The big question comes down to whether or not it was worth the effort to redevelop a new site. Update: Was developing a static site worth it? That’s it! Just run $ bundle exec middleman build and commit the changes if you’re happy with how things work. Page "/404.html", :directory_index => false In config.rb add: # Exlude 404.html from being placed in a directory Lastly, if you plan to use a custom 404 page, ensure your 404.html file is left as-is during the build operation. This enables you to test things out, revert changes, and ensure everything is working in a test environment before pushing the changes live, even after a build. In addition, it uses completely separate repositories for the development and production versions of your site. It is much cleaner - no additional rake tasks, overrides, or issues to worry about. The second method is to simply setup your config.rb file to use your Github Pages repo as the build destination by adding: # Change build directory to Github Pages repo This adds rake tasks to deploy your site upon build. The first is to use the middleman-gh-pages extension. If you’re thinking of using Middleman with Github Pages, there are two ways to make it really easy. Stay tuned for more content, and if you notice anything wonky please let me know! Some tips on Middleman + Github Pages With that all done, the new site is up and chugging along. Fortunately I could import all the comments to Disqus. My post on mapping sasquatch sightings generated a ton of discussion that I didn’t want to lose. I’ve wanted to do this before, but have been a bit hesitant. Since all of the ruby scripts, Middleman configs and templates, and page content is first generated on my local machine, my entire site can be versioned on github and served via Github Pages.They make rapidly deploying CSS designs incredibly painless by adding variables, mixins, and functions while removing the need to worry about vendor-specific prefixes. If you’re not already using Sass + Compass, I highly recommend them. Middleman uses the Sass CSS preprocessor and Compass framework.This site now does exactly what I want it to, no more, no less. So I set up Ruby, installed and configured Middleman, and re-developed everything from scratch. Now that I had a few evenings to spare, I was able to do something about it. The decision to switch to something else was a long time coming. Nonetheless, WordPress was no longer a pest that lived only on my web server: its shortcomings were now invading my inbox. During my largest traffic spike page performance suffered so much that my email exploded with inquiries about it (on the bright side, it did not go down). Under heavy load (thanks, Time!) I found WordPress achingly slow. Involving a database and PHP scripts to deliver static content only adds unnecessary overhead. Once published, the page content rarely changes. On top of that, this site (and most blogs in general) really don’t need to be dynamic. Logging in just to write a simple post became a chore: update this, double check that, fix this other thing that the previous update broke, and so on. Compatibility reports from other users are helpful, but are often incomplete. Each of these requires constant updates, and one can never be sure if updating one plugin is going to break other plugins, or worse, the entire site. That’s ridiculous.Įven when WordPress itself performed well, it required additional plugins just to have reasonable features (e.g., caching, contact forms, spam protection, SEO optimization, etc.). Some of my more popular pages were averaging 5 seconds to load. Despite serving compressed pages, caching data, and reducing unnecessary scripts, page load times seemed to increase with each new version. So why did I do it? Over the past two years I’ve become increasingly frustrated with WordPress. The new site is still a work in progress and I have more features to add, but all of the previous content has been brought over. Recently I’ve spent a few evenings removing WordPress and rebuilding this site on top of Middleman. The text below no longer describes my own site, but I would still use Middleman (or any other static generator) over WordPress. Note: In September 2017 this site was rebuilt with Hugo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |