Skip to content

Instantly share code, notes, and snippets.

View neagle's full-sized avatar

Nate Eagle neagle

View GitHub Profile
@neagle
neagle / prevent-orphans
Created November 15, 2012 20:49
Prevent Orphans in Text with Jekyll (Liquid)
<h2><a class="title" href="{{ post.url }}">
{% assign titleWords = post.title | split:&nbsp; %}
{% for word in titleWords %}{% if forloop.last %}&nbsp;{% else %} {% endif %}{{ word }}{% endfor %}
</a></h2>