1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-30 09:59:03 +01:00
gojekyll/example/variables.md
2017-08-21 15:06:53 -04:00

2.6 KiB

Site Variables (reference)

Name Value Notes
description {{ site.description }} (from _config.yml)
time {{ site.time }}
title {{ site.title }} (from _config.yml)
pages.size {{ site.pages.size }}
posts.size {{ site.posts.size }}
static_files.size {{ site.static_files.size }}
html_pages.size {{ site.html_pages.size }}
html_files.size {{ site.html_files.size }}
collections.size {{ site.collections.size }}
documents.size {{ site.documents.size }}
categories {{ site.categories }} {% for k in categories %}{{k}}{% endfor %}
tags {{ site.tags }}

{% if false %} {% capture ks %}{% for k in site %}{{ k }} {% endfor %}{% endcapture %} {% assign ks = ks | split: ' ' | sort %}

{% for k in ks %} {% endfor %}
{{k}}
{{site[k]|escape|truncate: 80}}
{% endif %}

Page Variables (reference)

Name Value
categories {{ page.categories }}
date {{ page.date }}
id {{ page.id }}
path {{ page.path }}
tags {{ page.tags }}
title {{ page.title }}
url {{ page.url }}

Jekyll Variables

Name Value
environment {{ jekyll.environment }}
version {{ jekyll.version }}