Goodbye, Middleman. Hello, Sculpin.
The first static site generator I worked with was Middleman. I was inspired by Julie Pagano’s Site Redesign Using Middleman. I will always be grateful to Julie for making the repository public at the time. It was a fantastic resource.
I was first introduced to Sculpin by Ashley Cyborski’s Fish Sticks: A Designer’s Adventure with Twig and Sculpin session at the very first MidCamp (Midwest Drupal Camp). And recently I attended Karl Kedrovsky’s Sculpin and Drupal session at DrupalCorn.
My motivation was centered around three goals:
- I want to learn Twig (which reminds me of Template Toolkit)
- I want to learn Symfony
- I want to get more comfortable with object oriented PHP
And since I like to one-up my challenges, I also decided to switch from using GitHub Pages to AWS S3 hosting.
did everything i could possibly do wrong when setting up my s3 bucket last night. but it works now— alimac (@alimacio) August 6, 2015
After making a couple of missteps (created a bucket
in the wrong region, waiting for DNS changes to take effect is like watching
brew install s3cmd) I finally got comfortable with publishing a
barebones Sculpin-generated site to S3.
Learn by doing
Dissection is one of my favorite methods of learning. It is not the easiest path to proficiency, but exploring site source and pairing it with documentation is often the quickest way to orient oneself around a new technology.
I created a very simple favicon image (letter A in a red circle) and used Real Favicon Generator to generate a spiffy cross-platform favicon set.
Tip: If you are building a blog, the Sculpin Blog Skeleton is a good template to reference. I first created my own content type, only to run into problems later, when I tried to add tagging. Using the default posts content type solved the tag index problem for me.
To be continued…
There are still some mysteries for me to resolve:
- Markdown tables don’t render.
With Middleman, I used the
kramdowngem to render Markdown tables.
- Tag paths. How do I make tags like Drupal Planet to use lowercase paths with dashes?
middleman-aliasgem allows you to create redirects. They are
meta-refreshredirects, but still useful if you decide to change your site’s URL structure.
- Generators. How do I build my own?
- Extending Sculpin. What kind of bundle can I build?