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!
28 Dec 2009
#
No, not without my clothes. That would be, just … not right.
This website had been in its previous state for a while, probably the last year or so, with little
traction. The vast majority of this stagnation being due to my working on implementing a design put
together by the always amazing Erika Greco (she designed my wife’s site – Bit By the Beauty
Bug). I loved what Erika had done – and I worked on getting it juuuust right for a long time.
After months and months of on and of work on implementing this beautiful work I decided – “It’s time
to get back to the basics”. There’s no need to get stuck in the cycle of working and re-working ad
nauseum (my name is not George Broussard).
So, I’m deciding to strip everything down to the barest of mark-up and style and concentrate on
letting this “brand” or “identity” grow organically through either the content or whatever
incremental changes I feel are right. Instead of trying to hit a done target, let’s get real and
let this grow organically to a point where I feel it’s done enough.
What does this do for me, you might ask? It allows me to write without a nagging voice in the back
of my head saying “you can publish this once the new redesign is live”. When new projects I’m
working on launch – I’m just going to post something about it instead of worrying that “the
portfolio section of the site isn’t done yet … oh the horror!”.
Over time I hope to make some incremental changes to make things less ugly, but only time will tell.
I’ll be documenting things as they change for posterity’s sake so I can review how time has treated
it, and maybe share its mutation with everyone with hopes any and all feedback would make me better.
So, please bear with me while I hang out here all exposed and vulnerable and stuff. It’s only
appropriate to bring in 2010 like Baby New Year.
Something I’ve held out on for a while now has been to switch over the settings for ActionMailer in
my application(s) to point to my hosted Google apps account. I figured it was probably time to do
so as piping email notifications through my comcast email account is generally, probably, a bad idea
(courtesy of the “No Duh” department).
Seems like it should be rather easy, no? Just change action mailer to resemble:
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "hosteddomain.com",
:authentication => :plain,
:user_name => "account@hosteddomain.com",
:password => "omgsup3rsecret"
}
Meh. Looks easy enough, right? Except for the fact Google’s got some magic TLS authentication thing
going on – you’ll run into an error in your mailers resembling Must issue a STARTTLS command
first.. Enough to make you work a little harder to get the magic working.
For those of you/us that are running Ruby 1.8.7 and Rails 2.3.x the answer is rather simple – add
:enable_starttls_auto => true to your smtp settings, which will result in :
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "hosteddomain.com",
:authentication => :plain,
:user_name => "account@hosteddomain.com",
:password => "omgsup3rsecret"
}
And for the rest of you/us (that would be me) that are still sticking with Ruby 1.8.6, there is an
answer in the form of the action_mailer_tls gem. Following the readme will get you to right
where you want to be – shoveling all the mail you would like into the ether that is the interwebs.
#
In getting up to speed with the new bells and whistles in Rails 2.0s RESTful routing capabilities I ran into something that puzzled me. Of the options for a resource defined among your routes there were two similar pieces that, for one reason or another, I could just not find a solid and bulletproof explanation for – :collection and :member. The :member part of it I got pretty easily for some reason, because its description is inherent in its own name … “a member among the default restful actions”. The :collection part? Notsomuch. After some digging in the Rails mailing list I ran into a great, and worthy, explanation for this knucklehead by a contributer named “deegee”:
For example, with map.resources :reviews, if you want to add a method ‘delete_all’ that deletes all reviews at once. You may want to call that with ‘/reviews/delete_all’ and method PUT (never use GET to delete something). This method is acting on all resources (a collection), so the route should be:
map.resources :reviews, :collection => { :delete_all => :put }
If you want to have a custom action acting on a specific resource, e.g. ‘/reviews/3/give_rating’, then your action is on a member and the route would be
map.resources :reviews, :member => { :give_rating => :put }
So that’s it! They’re the same other than :member working on a single resource, while :collection works on multiple. DONE!
#
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.
Over at Thredded I am still using Rails 1.2.3 (I’m a little gun-shy to upgrade to 2.0) and, of course, felt that slugged links were necessary for both search engine optimization and making things like assessing site analytics a little easier. It doesn’t even need justification as it’s a matter of fact and necessity for any and all social platforms – blogging, forums, etc. With RoR 1.2.3 the best way to get your links slugging it out was to incorporate a plugin like acts_as_sluggable. It works like a charm, really, and I’ve never had any case where I needed extra functionality.
… Until now. I’ve started incorporating some auto-updating magic to Thredded and needed to grab a lot of data back from an AJAX call (sorry Steve – XHR) in the form of JSON. All well and good so far. But, when new links needed to be built on the client side, I didn’t have my handy built-in Rails ActiveRecord overrides to spit out my new slugged-up link! What to do?!
I dug through the plugin source and found the function that built the url’s slug -
def make_slug(string)
string.to_s.downcase.gsub(/[^a-z0-9] /, '-').gsub(/- $/, '').gsub(/^- $/, '')
end
… And thought the quickest solution was just to rewrite it as a simple JS function.
function slug(id, title)
{
title = title.toLowerCase().replace(/[^a-z0-9] /g,'-').replace(/- $/g,'').replace(/^- $/g,'');
return(id '-' title);
}
Has it really been (well over) a year since I last posted a single thing on
this weblog? It goes without saying that that is a crying shame. Woefully
neglected is too soft a phrase to use when it comes to signifying how little
I’ve done with joeloliveira.com in the past year and a half. This site turned
into an abandoned wasteland – deserted and stagnant.
Why? It borders on cliche, and could probably be filed within the “cop out”
category, but for me it begins and ends with my not having the energy or
motivation to write for my own website when I got home from work. I probably
could have written a paragraph or two while from work, but never felt that was
fair to my employers. What about those hours outside of work? Surely there are
moments I could steal past 5 or 6ish to write something? Absolutely! But then
the question still remains -
What to write about? There are numerous topics I ponder in the course of a
day but for months – no one single target subject. I’ve usually just posted
whatever events I’ve attended, fun nights out with friends, stupid miscellanea
found on the internet – nothing of consequence for the majority of folks on the
internet. To my friends and family – of course I know it’s interesting to YOU,
but to communicate over the internet in such a blanket manner feels a bit too
detached.
What now? Well things have changed – drastically! A little over a month
ago I left my job at Molecular, an internet consultancy. The company I’ve left
to work for is a very small and fledgling little operation – my own company.
After months of preparation, nerve-wracked second guessing and laying
groundwork with hopes I could pull this off I actually did it. As difficult as
it was to leave such a great group of people at Molecular and all the
opportunity they’ve allowed me in the past three years I decided that it was
the right time to make this next big step.
So far, so good. I’m excited. I am already engaged with a local ad agency
helping them with a handful of their (immense) interactive clients. This
site is going to evolve into my portfolio for anyone looking for a resource to
bang out nice, clean, rich interfaces with XHTML, CSS, javascript, and other
interesting and challenging web-based technologies.
To give you an idea as to what types of things I’m involved with – The past
year and change I’ve actually been encouraging and helping Sara with [her own
weblog][2]. Have I not told you about it yet? For shame! [Go visit and take a
look][2] at the wonderful work she’s been doing. In addition to playing
occasional tech-support and copy editor for Sara I’ve been putting in most
spare hours working on my own project(s). Instead of writing about it – I’ve
been trying to DO it. Think it’s difficult to post on a blog every day? Try
doing it when you’re attempting to master new tools in addition to supporting
the users who are helping drive your new project. It’s not easy.
The ultimate end-game will be to afford myself the time to work on those few
previously mentioned projects that have grown over the past few years to
something I’m hoping could blossom into something beyond “pet project” status.
Once I’m a little more comfortable with their status I will post announcements
here.
In the meantime, this site will very occasionally feature commentary on the
things I find interesting about what’s going on in my industry, maybe some
personal anecdotes, and hopefully some useful original content. Let’s just hope
it’s not another 16 or 17 months until I write another post.