Aliases
Syntax
PAGE.Aliases
Returns
[]string
The Aliases
method on a Page
object returns the URL aliases as defined in front matter.
For example:
content/about.md
---
aliases:
- /old-url
- /really-old-url
title: About
---
+++
aliases = ['/old-url', '/really-old-url']
title = 'About'
+++
{
"aliases": [
"/old-url",
"/really-old-url"
],
"title": "About"
}
To list the aliases:
{{ range .Aliases }}
{{ . }}
{{ end }}