Skip to content

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

@abuddenb

Description

@abuddenb

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions