BaseURL
Returns the base URL as defined in the site configuration.
Syntax
SITE.BaseURL
Returns
string
Site 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:
March 8, 2025
:
content: Replace note shortcode calls with blockquote alerts (c540e6d29)
Improve this page