Jekyll traverses your site looking for files to process. Any files with YAML front matter are subject to processing. For each of these files, Jekyll makes a variety of data available via the Liquid templating system. The following is a reference of the available data.

Global Variables

Variable Description


Sitewide information + configuration settings from _config.yml. See below for details.


Page specific information + the YAML front matter. Custom variables set via the YAML Front Matter will be available here. See below for details.


In layout files, the rendered content of the Post or Page being wrapped. Not defined in Post or Page files.


When the paginate configuration option is set, this variable becomes available for use. See Pagination for details.

Site Variables

Variable Description


The current time (when you run the jekyll command).


A list of all Pages.


A reverse chronological list of all Posts.


If the page being processed is a Post, this contains a list of up to ten related Posts. By default, these are the ten most recent posts. For high quality but slow to compute results, run the jekyll command with the --lsi (latent semantic indexing) option. Also note GitHub Pages does not support the lsi option when generating sites.


A list of all static files (i.e. files not processed by Jekyll's converters or the Liquid renderer). Each file has three properties: path, modified_time and extname.


A subset of `site.pages` listing those which end in `.html`.


A subset of `site.static_files` listing those which end in `.html`.


A list of all the collections.

A list containing the data loaded from the YAML files located in the _data directory.


A list of all the documents in every collection.


The list of all Posts in category CATEGORY.


The list of all Posts with tag TAG.


All the variables set via the command line and your _config.yml are available through the site variable. For example, if you have url: in your configuration file, then in your Posts and Pages it will be stored in site.url. Jekyll does not parse changes to _config.yml in watch mode, you must restart Jekyll to see changes to variables.

Page Variables

Variable Description


The content of the Page, rendered or un-rendered depending upon what Liquid is being processed and what page is.


The title of the Page.


The un-rendered excerpt of the Page.


The URL of the Post without the domain, but with a leading slash, e.g. /2008/12/14/my-post.html

The Date assigned to the Post. This can be overridden in a Post’s front matter by specifying a new date/time in the format YYYY-MM-DD HH:MM:SS (assuming UTC), or YYYY-MM-DD HH:MM:SS +/-TTTT (to specify a time zone using an offset from UTC. e.g. 2008-12-14 10:30:00 +0900).

An identifier unique to the Post (useful in RSS feeds). e.g. /2008/12/14/my-post


The list of categories to which this post belongs. Categories are derived from the directory structure above the _posts directory. For example, a post at /work/code/_posts/ would have this field set to ['work', 'code']. These can also be specified in the YAML Front Matter.


The list of tags to which this post belongs. These can be specified in the YAML Front Matter.


The path to the raw post or page. Example usage: Linking back to the page or post’s source on GitHub. This can be overridden in the YAML Front Matter.

The next post relative to the position of the current post in site.posts. Returns nil for the last entry.


The previous post relative to the position of the current post in site.posts. Returns nil for the first entry.

ProTip™: Use Custom Front Matter

Any custom front matter that you specify will be available under page. For example, if you specify custom_css: true in a page’s front matter, that value will be available as page.custom_css.


Variable Description


Number of Posts per page.


Posts available for that page.


Total number of Posts.


Total number of Pages.

The number of the current page.


The number of the previous page.


The path to the previous page.


The number of the next page.


The path to the next page.

Paginator variable availability

These are only available in index files, however they can be located in a subdirectory, such as /blog/index.html.