Within your templates, you’ll have access to a few things that let you access both the current page being rendered and other pages, as well as information about the site itself.
The current page being rendered.
The updated, published, or created time. The first to exist is given.
Find the url the bundle will be rendered to.
The configured metadata for the current bundle is available easily.
This is all the data from the bundle’s YAML file.
The Jules “Engine” usde to process and coordinate the website rendering is available for access to a lot of useful facilities.
Find bundles in the engine filtered and ordered as needed.
order_key: The name of a meta field to order the results by order: ‘asc’ or ‘desc’ (default: ‘asc’) limit: The number of resuls to return (default: unlimited)
Any additional keyword arguments are taken as meta field values which bundles must match in order to be matched.
For example, to find all published bundles and give the most recent first:
engine.get_bundles_by(‘updated_time’, ‘desc’, status=’published’)
With the same parameters as get_bundles_by() find exactly one bundle, and raise ValueError if 0 or more than 1 are found.
Head to the API documentation for everything available here.
The parsed site.yaml configuration is available from any template.
All of the bundles on the site are available through the bundles variable.