Most commonly used Jekyll Liquid Tags

           
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.

Design by Freepik

Search a tag


Time Variables Output
{{site.time}}2017-01-11 02:23:53 +0000
{{site.time | date: '%B %d, %Y'}}January 11, 2017
{{site.time | date_to_string }}11 Jan 2017
{{site.time | date_to_long_string }}11 January 2017
{{site.time | date_to_xmlschema}}2017-01-11T02:23:53+00:00
{{site.time | date_to_rfc822 }}Wed, 11 Jan 2017 02:23:53 +0000
{{site.time| date: "%Y-%m-%d" }}2017-01-11
{{site.time | date: "%m/%d/%Y" }}01/11/2017
{{site.time | date: "%-m/%-d/%Y"}}1/11/2017
{{site.time | date: "%A, %B %-d, %Y"}}Wednesday, January 11, 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.

Something isn't right or missing in this article? Edit and create a pull request


Get Free Updates





You May Also Enjoy


go to top