Loading...

Formatting

Raw

raw escapes Liquid markup.

{% raw %}
{% endraw %}

Escaping double curly braces inside a markdown code block, use

{% raw %} {% endraw %}

Replace CRLF

If post.excerpt isn’t working, because windows crlf problem.

find _posts *.md -type f -exec dos2unix {} \;

Date Formats

Sort

Sort by date

Ascending

{% assign sorted = site.pages | sort:"date" %}

Descending

{% assign sorted = site.pages | sort:"date" | reverse %}

Sticky Post

{% assign sorted_posts = site.posts | sort:"meta.sticky","last" %}

Add this to the yaml frontmatter, both variants are allowed

meta["sticky"]: yes