Files
2026-07-13 11:58:46 +08:00

814 B

title, description, categories, keywords, params
title description categories keywords params
BaseURL Returns the base URL as defined in your project configuration.
functions_and_methods
returnType signatures
string
SITE.BaseURL

Project configuration:

{{< code-toggle file=hugo >}} baseURL = 'https://example.org/docs/' {{< /code-toggle >}}

Template:

{{ .Site.BaseURL }} → https://example.org/docs/

Note

There is almost never a good reason to use this method in your templates. Its usage tends to be fragile due to misconfiguration.

Use the absURL, absLangURL, relURL, or relLangURL functions instead.