-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Watch detect changes but do not rebuild home page in some cases #2869
Comments
Any Windows users who can confirm this? (it obviously works fine for me on macOS). |
Tested Hugo 0.18.1 (binary release) on Windows 10. Can't reproduce. Editor is Visual Studio Code. @TiTi, what editor are you using? Can you run the following and see if the file on disk is actually rendered with your updates?
|
I'm using Notepad2 which is still working fine with hugo_0.17.exe. Same with other editors (ex: Sublime Text 3). I've tried By digging further, I've notice the issue occurs only on the home page!
Maybe this is linked to my config.toml / custom theme : https://github.com/TiTi/hurock |
I can't reproduce this on the Hugo docs homepage with v0.18.1 or master. Make sure you're not seeing any template errors. |
Ok so here is how to reproduce:
Ok now launch in watch mode: Open your browser to http://localhost:1313/ and stay on the home page Then make a change to hello.md : The browser refresh the page automatically (you have to be a good catch, so fast in localhost with no content). There is no error in verbose mode, only warnings and they don't look related to the theme. 😢 |
Thanks a lot for that detailed report. With that I can reproduce it on macOS, too. I don't understand it, but if I can reproduce it, then I can fix it. But it looks like it is limited to the home page (which is even more weird). But I will fix it. Thanks again. |
You can also troubleshoot by checking what is happening when editing config.toml because in that case the changes appears with livereload, as I said in my original post. |
I think i have a problem that may clearly be related, but not with the "server" mode of hugo, even with the html pages generation. I create a new .md page with "draft = true". I've reverted from 0.18.1 to 0.17, and i don't have the problem with 0.17. (it seems at first glance from my side possibly related to this issue, but may need another distinct issue, i don't know) |
@SR-G it is not related to this issue. Could you create a thread in the discussion forum about it? http://discuss.gohugo.io/ |
An added note: The reason it failed for you (and not for me and many others) is that you used the .Site.Pages collection on the home page -- this is perfectly fine, and should of course work on reloads (it does now), but: Your templates will be more portable is you use This is the contextual page collection. For the home page, this will be the same as |
Ok thanks, I will look into it. |
Thank you for the precision. |
Faced a similar issue with the latest hugo_extended_0.80.0_Windows-64bit I host the website from root. One of these days I'll create that /docs for git pages |
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. |
Hi,
I've upgraded from 0.17 to 0.18.1.
hugo server
doesn't work has expected :hugo server
(no parameters)(output log is the very same has when the change was detected)
(similar to Watch doesn't always watch on Ubuntu 16.04 #2774 but I did not have the issue with 0.17)
Running Hugo 0.18.1 on Windows 10
The text was updated successfully, but these errors were encountered: