Skip to main content

API Index


You can think of Hugo development as its own language. It wraps Go's functionality for use in templates, and parses templates and reflects variables on its own, so it has effectively become a language in its own right. Only a limited subset of Go's functionality is exposed, so even if you're already familiar with Go and Go templates, you'll still need to check the documentation to use Hugo correctly.

Hugo's API splits into two kinds: methods and functions. Methods are stateful and bound to an object. .IsPage, for example, is bound to the .Page object. Functions are stateless and can be called directly, and can also be used inside an archetype.

The index below is compiled from the official Hugo documentation. This site doesn't duplicate that content. Follow the links back to the official pages to look things up.

Hugo Pipes

Methods

Duration

Menu entry

Output format

Page

Pager

Pages

Resource

Shortcode

Site

Taxonomy

Time

Functions

cast

collections

compare

crypto

css

debug

diagrams

encoding

fmt

global

go template

hash

hugo

images

inflect

js

lang

math

openapi3

os

partials

path

reflect

resources

safe

strings

templates

time

transform

urls

Accessibility settings

Font size