Open wanze opened 4 years ago
It only appends the site_url as defined in your system locales
setting. Do you have the full domain in there?
Hi @jackmcdade
Yep, I have the full domain in there. I assumed that this would be the expected setup because the docs about localization use full urls: https://docs.statamic.com/localization#locales
Can I use relative urls as well?
Cheers
Describe the bug
According to the docs, the
{{ asset }}
tag should output relative urls by default. However, it outputs full urls.To Reproduce
{{ theme:asset src="assets/app.js" }}
You'll see that the asset is referenced absolute:
https://mydomain.com/themes/mytheme/assets/app.js
Expected behavior
The url to the asset should be relative (
/themes/mytheme/assets/app.js
) and only be absolute if the parameterabsolute
is set totrue
.Solution
Remove the call to
URL::prependSiteUrl
inStatamic\Addons\Theme\ThemeTags::themeUrl()
.Environment details (please complete the following information):
2.11.5