mirror of https://github.com/onweru/compose.git

Robert Mihaly
07.44.2022 5b724e6023770d24323df1b5ae68119b4f9347f2
refs
author Robert Mihaly <rob@mihalyr.com>
Monday, March 7, 2022 13:44 +0100
committer Weru <16350351+onweru@users.noreply.github.com>
Friday, December 30, 2022 12:19 +0100
commit5b724e6023770d24323df1b5ae68119b4f9347f2
tree 20561c86f58b6918d9b553229aeb0ad7ec660b79 tree | zip | gz
parent 0a15e2b24d3e48754d3af7d036edde8096b03698 view | diff
Set rootURL to the site's baseURL

This fixes loading images and other assets in javascripts, when the site
is not deployed to the root folder, but into a sub-folder.

The fix replaces the server host based `rootURL` with Hugo's `baseURL`.
Since this URL is used in calls to `new URL`, it needs to end with a
trailing slash for the URLs to be constructed correctly.
1 files modified
3 ■■■■ changed files
assets/js/variables.js 3 ●●●● diff | view | raw | blame | history