spbnick / spbnick.github.io

"spbnick pokes tech" blog
http://spbnick.github.io
0 stars 0 forks source link

Comments for "Liquid: truncate without dots" #1

Open spbnick opened 8 years ago

spbnick commented 8 years ago

Please leave your comments for article "Liquid: truncate without dots" here.

arthurattwell commented 8 years ago

Thanks! That truncate takes a second argument is super-useful. It also works for truncatewords. In my case, I needed the parent folder in a page path, and your tip helped me get to {{ page.path | replace: "/", " " | truncatewords: 1, "" }}.

spbnick commented 8 years ago

@arthurattwell You're welcome! I needed it for a similar purpose, also.