Gopher

Variables and Params

Hugo’s templates are context aware and make a large number of values available to you as you’re creating views for your website.

Site Variables

Many, but not all, site-wide variables are defined in your site’s configuration. However, Hugo provides a number of built-in variables for convenient access to global values in your templates. Read More »

Shortcode Variables

Shortcodes can access page variables and also have their own specific built-in variables. Read More »

Page Variables

Page-level variables are defined in a content file’s front matter, derived from the content’s file location, or extracted from the content body itself. Read More »

Pages Methods

Pages is the core page collection in Hugo and has many useful methods. Read More »

Taxonomy Variables

Taxonomy pages are of type Page and have all page-, site-, and list-level variables available to them. However, taxonomy terms templates have additional variables available to their templates. Read More »

File Variables

You can access filesystem-related data for a content file in the .File variable. Read More »

Menu Entry Properties

A menu entry in a menu-template has specific variables and functions to make menu management easier. Read More »

Hugo-specific Variables

The .Hugo variable provides easy access to Hugo-related data. Read More »

Git Info Variables

Get the last Git revision information for every content file. Read More »

Sitemap Variables

A sitemap is a Page and therefore has all the page variables available to use sitemap templates. They also have the following sitemap-specific variables available to them: .Sitemap.ChangeFreq the page change frequency .Sitemap.Priority the priority of the page .Sitemap.Filename the sitemap filename Read More »