site.time
|
The current time (when you run the <code>jekyll</code> command).
</p></td>
</tr>
<tr>
<td><p><code>site.pages</code></p></td>
<td><p>
A list of all Pages.
</p></td>
</tr>
<tr>
<td><p><code>site.posts</code></p></td>
<td><p>
A reverse chronological list of all Posts.
</p></td>
</tr>
<tr>
<td><p><code>site.related_posts</code></p></td>
<td><p>
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
<code>jekyll</code> command with the <code>--lsi</code> (<a href="https://en.wikipedia.org/wiki/Latent_semantic_analysis#Latent_semantic_indexing">latent semantic indexing</a>) option. Also note GitHub Pages does not support the <code>lsi</code> option when generating sites.
</p></td>
</tr>
<tr>
<td><p><code>site.static_files</code></p></td>
<td><p>
A list of all <a href="/docs/static-files/">static files</a> (i.e.
files not processed by Jekyll's converters or the Liquid renderer).
Each file has five properties: <code>path</code>, <code>modified_time</code>, <code>name</code>, <code>basename</code> and <code>extname</code>.
</p></td>
</tr>
<tr>
<td><p><code>site.html_pages</code></p></td>
<td><p>
A subset of `site.pages` listing those which end in `.html`.
</p></td>
</tr>
<tr>
<td><p><code>site.html_files</code></p></td>
<td><p>
A subset of `site.static_files` listing those which end in `.html`.
</p></td>
</tr>
<tr>
<td><p><code>site.collections</code></p></td>
<td><p>
A list of all the collections.
</p></td>
</tr>
<tr>
<td><p><code>site.data</code></p></td>
<td><p>
A list containing the data loaded from the YAML files located in the <code>_data</code> directory.
</p></td>
</tr>
<tr>
<td><p><code>site.documents</code></p></td>
<td><p>
A list of all the documents in every collection.
</p></td>
</tr>
<tr>
<td><p><code>site.categories.CATEGORY</code></p></td>
<td><p>
The list of all Posts in category <code>CATEGORY</code>.
</p></td>
</tr>
<tr>
<td><p><code>site.tags.TAG</code></p></td>
<td><p>
The list of all Posts with tag <code>TAG</code>.
</p></td>
</tr>
<tr>
<td><p><code>site.url</code></p></td>
<td><p>
Contains the url of your site as it is configured in the <code>_config.yml</code>.
For example, if you have <code>url: http://mysite.com</code>
in your configuration file, then it will be accessible in Liquid as
<code>site.url</code>. For the development environment there is
<a href="/news/#3-siteurl-is-set-by-the-development-server">an exception</a>,
if you are running <code>jekyll serve</code> in a development environment
<code>site.url</code> will be set to the value of <code>host</code>,
<code>port</code>, and SSL-related options. This defaults to
<code>url: http://localhost:4000</code>.
</p></td>
</tr>
<tr>
<td><p><code>site.[CONFIGURATION_DATA]</code></p></td>
<td><p>
All the variables set via the command line and your
<code>_config.yml</code> are available through the <code>site</code>
variable. For example, if you have <code>foo: bar</code>
in your configuration file, then it will be accessible in Liquid as <code>site.foo</code>.
Jekyll does not parse changes to <code>_config.yml</code> in
<code>watch</code> mode, you must restart Jekyll to see changes to variables.
</p></td>
</tr>
|