Template Variables

Context variables

Most of the data for static site will come from the context configuration in tsg.yml. Context allows you to import data from a variety of sources such as .graphl, .json, .yml files or simply inline values. See the tsg.yml documentation for more info.

Global Variables

All Routes

  • env - Environment variables set in site config
  • currentPath - Current path generated from the current route's path
  • global - This variable makes it possible to access the global context variables even if they have be overridden in the route configuration.

Paginated Routes

  • item -  Current content item

Listing Routes

  • pagination.currentPage - The number of the current page
  • pagination.totalPages - The total number of listing pages

Join us

Interested in joining the team as coworker or investor?