Skip to content

Instantly share code, notes, and snippets.

@neagle
Created November 15, 2012 20:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neagle/4081163 to your computer and use it in GitHub Desktop.
Save neagle/4081163 to your computer and use it in GitHub Desktop.
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment