Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set rootURL to the site's baseURL #75

Merged
merged 1 commit into from
Dec 30, 2022
Merged

Set rootURL to the site's baseURL #75

merged 1 commit into from
Dec 30, 2022

Conversation

mihalyr
Copy link
Contributor

@mihalyr mihalyr commented Mar 7, 2022

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.

Fixes #74

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.
@bizb0630
Copy link

When I did this, the theme itself stopped rendering (buttons and other stuff is not displaying). Seems like unloaded webpage, where technically you can see the text, but the site itself looks ugly. How to fix it?

@onweru onweru merged commit 5b724e6 into onweru:master Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Broken style when deployed to sub-folder
3 participants