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
- Introduction
- Bundling
- Fingerprinting
- JavaScript building
- Minification
- PostCSS
- Resource from string
- Resource from template
- Transpile Sass to CSS
Methods
Duration
Menu
Menu entry
Output format
Page
- Aliases
- AllTranslations
- AlternativeOutputFormats
- Ancestors
- BundleType
- CodeOwners
- Content
- ContentWithoutSummary
- CurrentSection
- Data
- Date
- Description
- Draft
- Eq
- ExpiryDate
- File
- FirstSection
- Fragments
- FuzzyWordCount
- GetPage
- GetTerms
- GitInfo
- HasMenuCurrent
- HasShortcode
- HeadingsFiltered
- InSection
- IsAncestor
- IsBranch
- IsDescendant
- IsHome
- IsMenuCurrent
- IsNode
- IsPage
- IsSection
- IsTranslated
- Keywords
- Kind
- Language
- Lastmod
- Layout
- Len
- LinkTitle
- Next
- NextInSection
- OutputFormats
- Page
- Pages
- Paginate
- Paginator
- Param
- Params
- Parent
- Path
- Permalink
- Plain
- PlainWords
- Prev
- PrevInSection
- PublishDate
- RawContent
- ReadingTime
- Ref
- RegularPages
- RegularPagesRecursive
- RelPermalink
- RelRef
- Render
- RenderShortcodes
- RenderString
- Resources
- Rotate
- Scratch
- Section
- Sections
- Site
- Sitemap
- Sites
- Slug
- Store
- Summary
- TableOfContents
- Title
- TranslationKey
- Translations
- Truncated
- Type
- Weight
- WordCount
Pager
- First
- HasNext
- HasPrev
- Last
- Next
- NumberOfElements
- PageGroups
- PageNumber
- PagerSize
- Pagers
- Pages
- Prev
- TotalNumberOfElements
- TotalPages
- URL
Pages
- ByDate
- ByExpiryDate
- ByLanguage
- ByLastmod
- ByLength
- ByLinkTitle
- ByParam
- ByPublishDate
- ByTitle
- ByWeight
- GroupBy
- GroupByDate
- GroupByExpiryDate
- GroupByLastmod
- GroupByParam
- GroupByParamDate
- GroupByPublishDate
- Len
- Limit
- Next
- Prev
- Related
- Reverse
Resource
- Colors
- Content
- Crop
- Data
- Err
- Exif
- Fill
- Filter
- Fit
- Height
- MediaType
- Meta
- Name
- Params
- Permalink
- Process
- Publish
- RelPermalink
- Resize
- ResourceType
- Title
- Width
Shortcode
Site
- AllPages
- BaseURL
- BuildDrafts
- Config
- Copyright
- Data
- Dimension
- GetPage
- Home
- IsDefault
- Language
- LanguagePrefix
- Languages
- Lastmod
- MainSections
- Menus
- Pages
- Param
- Params
- RegularPages
- Role
- Sections
- Sites
- Store
- Taxonomies
- Title
- Version
Taxonomy
Time
- Add
- AddDate
- After
- Before
- Day
- Equal
- Format
- Hour
- IsDST
- IsZero
- Local
- Minute
- Month
- Nanosecond
- Round
- Second
- Sub
- Truncate
- UTC
- Unix
- UnixMicro
- UnixMilli
- UnixNano
- Weekday
- Year
- YearDay
Functions
cast
collections
- collections.After
- collections.Append
- collections.Apply
- collections.Complement
- collections.D
- collections.Delimit
- collections.Dictionary
- collections.First
- collections.Group
- collections.In
- collections.Index
- collections.Intersect
- collections.IsSet
- collections.KeyVals
- collections.Last
- collections.Merge
- collections.NewScratch
- collections.Querify
- collections.Reverse
- collections.Seq
- collections.Shuffle
- collections.Slice
- collections.Sort
- collections.SymDiff
- collections.Union
- collections.Uniq
- collections.Where
compare
crypto
css
debug
diagrams
encoding
fmt
global
go template
hash
hugo
- hugo.BuildDate
- hugo.CommitHash
- hugo.Data
- hugo.Deps
- hugo.Environment
- hugo.Generator
- hugo.GoVersion
- hugo.IsDevelopment
- hugo.IsExtended
- hugo.IsMultihost
- hugo.IsMultilingual
- hugo.IsProduction
- hugo.IsServer
- hugo.Sites
- hugo.Store
- hugo.Version
- hugo.WorkingDir
images
- images.AutoOrient
- images.Brightness
- images.ColorBalance
- images.Colorize
- images.Config
- images.Contrast
- images.Dither
- images.Filter
- images.Gamma
- images.GaussianBlur
- images.Grayscale
- images.Hue
- images.Invert
- images.Mask
- images.Opacity
- images.Overlay
- images.Padding
- images.Pixelate
- images.Process
- images.QR
- images.Saturation
- images.Sepia
- images.Sigmoid
- images.Text
- images.UnsharpMask
inflect
js
lang
- lang.FormatAccounting
- lang.FormatCurrency
- lang.FormatNumber
- lang.FormatNumberCustom
- lang.FormatPercent
- lang.Merge
- lang.Translate
math
- math.Abs
- math.Acos
- math.Add
- math.Asin
- math.Atan
- math.Atan2
- math.Ceil
- math.Cos
- math.Counter
- math.Div
- math.Floor
- math.Log
- math.Max
- math.MaxInt64
- math.Min
- math.Mod
- math.ModBool
- math.Mul
- math.Pi
- math.Pow
- math.Product
- math.Rand
- math.Round
- math.Sin
- math.Sqrt
- math.Sub
- math.Sum
- math.Tan
- math.ToDegrees
- math.ToRadians
openapi3
os
partials
path
reflect
- reflect.IsImageResource
- reflect.IsImageResourceProcessable
- reflect.IsImageResourceWithMeta
- reflect.IsMap
- reflect.IsPage
- reflect.IsResource
- reflect.IsSite
- reflect.IsSlice
resources
- resources.ByType
- resources.Concat
- resources.Copy
- resources.ExecuteAsTemplate
- resources.Fingerprint
- resources.FromString
- resources.Get
- resources.GetMatch
- resources.GetRemote
- resources.Match
- resources.Minify
- resources.PostProcess
safe
strings
- strings.Chomp
- strings.Contains
- strings.ContainsAny
- strings.ContainsNonSpace
- strings.Count
- strings.CountRunes
- strings.CountWords
- strings.FindRESubmatch
- strings.FindRE
- strings.FirstUpper
- strings.HasPrefix
- strings.HasSuffix
- strings.Repeat
- strings.Replace
- strings.ReplacePairs
- strings.ReplaceRE
- strings.RuneCount
- strings.SliceString
- strings.Split
- strings.Substr
- strings.Title
- strings.ToLower
- strings.ToUpper
- strings.Trim
- strings.TrimLeft
- strings.TrimPrefix
- strings.TrimRight
- strings.TrimSpace
- strings.TrimSuffix
- strings.Truncate
templates
time
transform
- transform.CanHighlight
- transform.Emojify
- transform.HTMLEscape
- transform.HTMLUnescape
- transform.HTMLToMarkdown
- transform.Highlight
- transform.HighlightCodeBlock
- transform.Markdownify
- transform.Plainify
- transform.PortableText
- transform.Remarshal
- transform.ToMath
- transform.Unmarshal
- transform.XMLEscape