Most commonly used Jekyll Liquid Tags

      4 mins read.  

Most commonly used Jekyll Liquid Tags

Jekyll Liquid tags like Jekyll date, time and variables like site.pages, page.content etc., are some of the most commonly used Jekyll variables. Here is a searchable list for those who are looking for such tags, site and page variables.

Search a tag



Time Variables Output
{{site.time}}2017-08-18 03:55:50 +0000
{{site.time | date: '%B %d, %Y'}}August 18, 2017
{{site.time | date_to_string }}18 Aug 2017
{{site.time | date_to_long_string }}18 August 2017
{{site.time | date_to_xmlschema}}2017-08-18T03:55:50+00:00
{{site.time | date_to_rfc822 }}Fri, 18 Aug 2017 03:55:50 +0000
{{site.time| date: "%Y-%m-%d" }}2017-08-18
{{site.time | date: "%m/%d/%Y" }}08/18/2017
{{site.time | date: "%-m/%-d/%Y"}}8/18/2017
{{site.time | date: "%A, %B %-d, %Y"}}Friday, August 18, 2017
Site Variables Output
{{site.pages}}A list of all Pages.
{{site.posts}}A reverse chronological list of all Posts.
{{site.related_posts}}A list of up to ten related Posts.
{{site.static_files}}A list of all static files.
{{site.html_pages}}A subset of site.pages listing those which end in .html.
{{site.html_files}}A subset of site.static_files listing those which end in .html.
{{site.data}}A list containing the data loaded from the YAML files located in the _data directory.
{{site.documents}}A list of all the documents in every collection.
{{site.collections}}A list of all the collections.
{{site.categories.CATEGORY}}The list of all Posts in category CATEGORY.
{{site.tags.TAG}}The list of all Posts with tag TAG.
Page Variables Output
{{page.content}}The content of the Page.
{{page.title}}The title of the Page.
{{page.excerpt}}The un-rendered excerpt of the Page.
{{page.url}}he URL of the Post without the domain, but with a leading slash - /common-jekyll-tags/
{{page.id}}An identifier unique to the Post .
{{page.excerpt}}The un-rendered excerpt of the Page.
{{page.categories}}The list of categories to which this post belongs.
{{page.tags}}The list of tags to which this post belongs.
{{page.path}}The path to the raw post or page. Ex: _posts/2016-12-20-jekyll-liquid-common-tags.md.
{{page.next}}The next post relative to the position of the current post in site.posts
{{page.previous}}The previous post relative to the position of the current post in site.posts
{{page.excerpt}}The un-rendered excerpt of the Page.



Source: https://jekyllrb.com/docs/variables/

If you think that any frequently used Jekyll variable is missing then do let me know in the comments.

This article is written by sharath.dt Follow him @webjeda.