2.7 KiB
2.7 KiB
title | permalink |
---|---|
Variables | /docs/variables/ |
Jekyll traverses your site looking for files to process. Any files with front matter are subject to processing. For each of these files, Jekyll makes a variety of data available via the Liquid. The following is a reference of the available data.
Global Variables
{% for var in site.data.jekyll_variables.global %}
{% endfor %}
Variable | Description |
---|---|
|
{{- var.description -}} |
Site Variables
{% for var in site.data.jekyll_variables.site %}
{% endfor %}
Variable | Description |
---|---|
|
{{- var.description -}} |
Page Variables
{% for var in site.data.jekyll_variables.page %}
{% endfor %}
Variable | Description |
---|---|
|
{{- var.description -}} |
ProTip™: Use Custom Front Matter
Any custom front matter that you specify will be available under
<code>page</code>. For example, if you specify <code>custom_css: true</code>
in a page’s front matter, that value will be available as
<code>page.custom_css</code>.
If you specify front matter in a layout, access that via <code>layout</code>.
For example, if you specify <code>class: full_page</code>
in a layout’s front matter, that value will be available as
<code>layout.class</code> in the layout and its parents.
Paginator
{% for var in site.data.jekyll_variables.paginator %}
{% endfor %}
Variable | Description |
---|---|
|
{{- var.description -}} |
Paginator variable availability
These are only available in index files, however they can be located in a
subdirectory, such as <code>/blog/index.html</code>.