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

LiveReload fails when site is served from subdirectory and canonifyURLs is enabled #10571

Open
abuddenb opened this issue Dec 22, 2022 · 1 comment

Comments

@abuddenb
Copy link

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.108.0+extended darwin/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes.

When canonifyURLs = true is set, Hugo detects changes to various layouts but does not reflect them to the browser, necessitating a hugo server restart. Changes to the homepage layout were detected and published but not for various layouts/_default/*.html or taxonomy templates.

config.toml:

baseURL = "https://www.mydomain.com/mypath/"
languageCode = "en-us"
title = "Title"
theme = "sometheme"
canonifyURLs = true

Workaround

canonifyURLs = false and make use of {{ "some/rel/href" | relURL }} in templates.

@jmooring
Copy link
Member

This problem is limited to sites served from a subdirectory.

baseURL Test result
https://example.org/ PASS
https://example.org/foo/ FAIL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants