BaseURL
Returns the base URL as defined in your project configuration.
Syntax
SITE.BaseURL
Returns
string
Project configuration:
baseURL: https://example.org/docs/
baseURL = 'https://example.org/docs/'
{
"baseURL": "https://example.org/docs/"
}
Template:
{{ .Site.BaseURL }} → https://example.org/docs/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.
Last updated:
February 25, 2026
:
Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)
Improve this page