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

Page resources published one level too deep when front matter has url with file extension #12472

Open
jmooring opened this issue May 7, 2024 · 0 comments

Comments

@jmooring
Copy link
Member

jmooring commented May 7, 2024

Reference: https://discourse.gohugo.io/t/url-stuff-captive-captive-htm-behaviour-different-after-hugo-v0-122-0

With a url in front matter that includes a file extension, page resources are published one level deeper when comparing result of v0.122.0 and v0.123.0.

content/
└── p1/
    ├── a.txt
    └── index.md  <-- front matter:  url = "/foo/bar.html"

Published site with v0.122.0

public/
└── foo/
    ├── a.txt
    └── bar.html

Published site with v0.123.0

public/
└── foo/
    ├── bar/
    │   └── a.txt
    └── bar.html

We can obviously make this work by enabling the default link and render hooks, but it seems like the change was unintentional... maybe.

Although the current behavior is different than it was in v0.122.0, I’m not convinced it’s wrong. The current behavior prevents asset collisions; the old behavior did not. Not sure what to do here.

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

1 participant