BaseURL
Returns the base URL as defined in the site 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 15, 2026
:
content: Rename site configuration to project configuration (phase 1) (f3ae0ce86)
Improve this page