Document keys of global variable `{{ jekyll }}` (#9653)

Merge pull request 9653
This commit is contained in:
Ashwin Maroli 2024-08-29 20:46:07 +05:30 committed by GitHub
parent 5947231337
commit 3283e679bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -16,6 +16,9 @@ global:
description: >-
Layout specific information + the <a href="/docs/front-matter/">front matter</a>.
Custom variables set via front matter in layouts will be available here.
- name: jekyll
description: >-
Jekyll-centric information will be available here. See below for details.
- name: theme
description: >-
Theme-gem specific information as defined in the theme's gemspec. Useful for rendering
@ -154,6 +157,12 @@ page:
The previous post relative to the position of the current post in <code>site.posts</code>.
Returns <code>nil</code> for the first entry.
jekyll:
- name: jekyll.version
description: Version of Jekyll used to build the site.
- name: jekyll.environment
description: Value assigned to environment variable <code>JEKYLL_ENV</code> during a build.
theme:
- name: theme.root
description: Absolute path to the theme-gem.

View File

@ -34,6 +34,10 @@ The following is a reference of the available data.
</p>
</div>
## Jekyll Variables
{% include docs_variables_table.html scope=site.data.jekyll_variables.jekyll %}
## Theme Variables {%- include docs_version_badge.html version="4.3.0" -%}
{: #theme-variables }