Hello Jekyll.
I’m behind the curve and finally moved my old neglected website to a new neglected website. This has, for a long while, been on my list of things to get to. The reasons why are too many to count, but at the core the wordpress experience is a terrible chore. Jekyll, once it’s all set up and ready to go, moves into the background. It’s an afterthought. I can now concentrate on writing - not updating it every few weeks, not learning a new UI every several point releases, not worrying about security vulnerabilities, and a complete lack of a WYSIWYG editor. Free at last!
This is the first time I’ve published a site with Jekyll so here are a few tips and resources I picked up:
- Ben Balter’s wordpress to Jekyll exporter plugin. I couldn’t (wouldn’t) have been able to move over the last several years’ worth of embarrassing drivel to this without it.
- The posts exported from that plugin are saved with permalinks not containing the trailing index.html. Jekyll will complain if that path doesn’t contain a file. The following will run through the posts with sed and tack on the
index.html
to the end of your permalink:
find . -name \*.md -exec \
sed -i "" '/permalink/s|$|index.html|' {} \;
- As advertised, the jekyll-s3 gem just works. It took me all of a minute to get things set up and my files uploaded to S3.
- One bump I ran into had to do with using Amazon’s cloudfront CDN in front of S3. The root url for my domain, without
index.html
, displayed some sort of permission error. If I went directly to the cloudfront address it worked fine. After plenty of googling I gave up. S3 alone is fine enough for me right now.
- S3 is one of a few hosting options that don’t make hosting your site with a naked domain possible. To get around this use the free naked domain redirect from WWWizer.
- If you’re using GitHub pages then using prose.io is a no-brainer. It hooks into github seamlessly and allows you to publish directly from the app. If all blogging platforms had UX half as good, the internet would be a better place. Excellent work. (Hat-tip to Kyle Fiedler for introducing me to prose.io)
- If you like editing markdown locally then check out Mou. It’s my editor of choice. On the iPad I’ve enjoyed Byword, thanks to its integration with Dropbox.
- Heard from Pieter Joost on twitter letting me know about wercker. Werker is a content continuous delivery platform in the cloud. You can leverage its power to do the content generation and deployment process for you. Check it out if you’re in need!
Finally, I must give credit where credit is due. If it weren’t for my friend Dan Pererra’s willingness to let me lift the markup and style from his own website, perrera.com/blog, then I don’t think I would have made this move. It’s clean, responsive and, like Jekyll, it puts the content up front and center. Check out Dan’s, and all his wonderful business partners’, work at the Outfit. They’re all fantastic people (and great to raise a glass with). Thank you, Dan!
After searching for a plugin that might accommodate this in WordPress and coming up empty, I went
digging for a possible easy way to do this with the means available. Logic dictates that with
custom fields this should be rather easy to accomplish.
The only snag might have been that in retreiving a custom field for a page or a post you need the
page or post’s ID. Usually this id is readily available within “the loop”, but what about when
we’re up in the tags? A little searching in the codex reveals that we can grab your pages’ ID
with $wp_query->post->ID. Fantastic – because, with that we’re pretty much done! Adding the
following in your theme’s header.php file between … :
” />
” />
.. and “meta_keywords” and “meta_description” as custom fields with your desired content for each
will get you to where you want to be.
Suffice it to say – it’s not a winning combination. There are two definitive hacks you’ll need to
get things to work.
First, a plugin to disable canonical URL redirection. Second, a hack to wp-settings.php that
circumvents the XO php configuration’s not having $_SERVER[‘REQUEST_URI’].
Update: the second hack will break the non-admin part of the site in the context of the current
site I’ve been working on. So your mileage may vary.
#
I’m in the process of building and theming the brand new bitbythebeautybug.com for Sara. Not only is she excited, but I’m elated to be working with the newest of the new in WordPress “technology”. It’s a strange leap from all the WP installs I’ve dealt with previously, but you can tell they’ve dropped a metric ton of work into making it the most secure (as it possibly can be) and usable blogging platform out there.
The first thing we did to get this ball rolling was to find a designer that truly “got” Sara’s vision for her brand. Luckily we were able to retain the services of a wonderful designer named Erika. I really liked the work she did for the RailsEnvy guys and figured I would give it a shot to see if she would be available for some design work. Turns out she had some space in her (I’m sure) busy calendar and whipped up some designs for us. Design – complete. Much thanks to Miss Greco!
On my end, the development work so far, other than slicing images, has consisted of a few tasks.
- Since this would be a custom theme, I looked for the most generic, baseline theme I could find to bend to my will. After a lot of looking I decided on one of these themes provided by Charity at Design Adaptations. It’s well developed, very well commented and absolutely gets out of the way of anyone who is using it as a jump-off for their custom wordpress theme. I’m still struggling with whether this is “custom” if it inherits code from someone else’s work. Regardless – she deserves kudos.
- One of the things I was looking forward to playing with in these recent versions of WordPress are the “Widgets” the WP team has put so much work into. Picking and choosing all of the content blocks you want to see around your site, re-ordering them as you wish – it’s just nice. See a widget you like, download, activate, put it where you want it. The only slightly difficult part was to enable the sidebar for widget support, and then figure out just how to enable multiple “sidebars”.
- Once the theme actually supported all of these widgets – it was time to find them.
- Flexo Archives – reducing the clutter that the generic Archives widget spits out.
- Limited Catlists – displaying the latest posts in Category X – for our purposes, the posts categorized under “Featured”. I couldn’t find a “Featured Posts” widget so this will just have to do.
- Text widget – this one comes stock with WP by default and takes care of those scenarios where a little duct tape is needed. No decent FeedBurner widget? That’s fine – copy and paste the code Feedburner gives you into the text widget. Need a small “About” widget? Text widget to the rescue.
It goes without saying – I’m far from finished, but in the initial sprint to build out this site these are the pieces I managed to take note of. All in all though, WordPress 2.5 has been nothing short of a revelation in terms of where it came from, and where it’s going to. Huge props go to Happy Cog for the work they put into the new WP dashboard. It just feels so right.