RelPermalink
Returns the relative permalink of the given page.
- Syntax
- PAGE.RelPermalink
- Returns
- string
Usage
The RelPermalink method on a Page object returns the server-relative URL of the given page. Hugo creates the URL path from the logical path of the page, the slug and url fields in front matter, and your project configuration.
Examples
Consider this project configuration:
baseURL: https://example.org/docs/
title: Documentation
baseURL = 'https://example.org/docs/'
title = 'Documentation'
{
"baseURL": "https://example.org/docs/",
"title": "Documentation"
}
{{ $page := site.GetPage "/about" }}
{{ $page.RelPermalink }} → /docs/about/Last updated:
November 8, 2026
:
content: Remove categories from front matter (1cc1dd83a)
Improve this page