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
Live-reload does not detect new Page resources #4768
Comments
I just tested this with the latest Hugo master, and this works perfectly on I tested this on https://github.com/bep/hugotest/tree/master/content/resourcemeta/bundle-with-resource-meta-toml (note that the last commit in this repo requires the latest Hugo dev version): When server was running:
I tested the above OK on both current master and |
I have not also performed the same test on Windows 10. Works fine for me. Can you try this one more time; and if this is still an issue, can you describe your steps in more detail so we can try to identify what happens. |
I tested this again and I'm still able to reproduce using hugo 0.41 on Windows 10. Here are my steps to I did to test:
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>
{{ block "title" . }}
{{ .Title }} | {{ .Site.Title }}
{{ end }}
</title>
{{ range .AllTranslations}}
<link rel="alternate" hreflang="{{ .Language }}" href="{{ .Permalink }}" />
{{ end }}
</head>
<body>
{{ block "content" . }}{{ end }}
</body>
</html>```
**layouts/index.html**
I hope this helps. As it is a very simple setup I did not create a github repo for this to checkout and reproduce. |
As I said, I'm not able to reproduce it with a similar simple setup. So the devil is in the details. Someone may eventuallyt look closer into this, but if you can create a runnable GH repo, I can probably look at it sooner rather than later. |
I uploaded the complete working directory I used for testing (including the image, it's CC0 and thus safe to use and distribute) to github, here's the link: https://github.com/internetfreak/pagebundle-bug/tree/master |
The same is happening for me on macOS. Will try to look into it as well. Environment information |
I have the same problem on windows and on a docker jojomi image (wich is on a synology nas running H24 in server mode). It's really super hard for us because we have a preview server running for non-dev to work before going to production and I can't say to them they have to restart the server everytime they add a resource to a page. Please fix this, it's there since I started using Hugo 4 months ago =/ |
This is also happening to me on macos. |
In case this is useful information, I am finding that I can't easily reproduce this bug anymore on the current version of Hugo. Wonder if others are having a similar experience. |
Unable to reproduce with v0.111.3 on Linux or Windows. If you cross file system boundaries you may need to use the
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Related to this: https://discourse.gohugo.io/t/livereload-not-rebuilding-page-resources/11715/4
The issue
When using hugo with server mode for development reasons and you create a new page bundle, hugo notices the
index.md
file of the bundle and starts rendering it on changes. However, if you also add resources like images to that bundle, they won't be available in.Resources
unless you restart the server, which slows down developement a lot.Expected behavior
Adding resources to a page bundle should immediately populate
.Resources
to be retrieved using.Resources.Match
or.Resources.GetMatch
without requiring to restart the development server.Envinronment informations
Version of Hugo: 0.40.3
OS: Windows 10 Pro x64
The text was updated successfully, but these errors were encountered: