but the last rendered changes do not appear.
manual browser refresh doesn’t help
using a different browser doesn’t help
clearing the browser cache and manual refresh doesn’t help
If I break out of the hugo server watch, and restart Hugo server and refresh the browser the changes then appear.
Seems like the watch is doing it’s job and the pages are being rebuilt but the memory FS is not actually being updated.
The memory FS is set correctly on the initial startup but not after any rebuild on changes forced by the watch code.
Any thoughts on why this is happing now but not a week ago. I have rebooted my machine (linux ubuntu) twice and the behavior persists.
FYI with the version update it’s no longer taking painfully long to render and live refresh my build (elements were all loading slowly and thus my javascript window ready code was delayed and the page looking horrible while it was waiting).
So whatever was going on with my copy of .18.1 it’s much better now.
@bep Maybe my issue was related to this. It was my homepage that was not updating and I recently changed my partial code to .Site.RegularPages. Was this resolved from .18 to .19. That would explain why it went away with change in version.
I have the same problem. I simply just save the changes to my source again and live reload refreshes the page.
Make change.
Save change to disk.
Live reload should work, but it doesn’t.
Save changes to disk again.
Live reload magically refreshes the page it should have on the first save.
It’s rare that I have to re-run the hugo serve command again to see the changes, but sometimes that too.
This could be an underlying problem in the way Hugo implements live reload functionality.
The only times I have noticed this problem is when I make changes and save to disk too fast. For example, if I am working on a template file, I save my changes, live reload gets triggered, but then 1 second later I make another change and save again. Live reload triggers again.
I’m not sure but somewhere in multiple changes too fast and saving them causes this issue. Saving again makes it load again.
I discovered it while writing a blog post about Hugo 0.20 earlier today. I suspected that I had screwed up something in 0.20, but this has to be from Hugo 0.18 – I just haven’t bumped into this until now. I will fix it, but now today …
saving again for me does nothing. The change is not reflected by anything I do currently.
BUT it seems to be something to do with the template files maybe?? because if I change a content file the md gets rendered but the template file (the shortcode in this case) is unchanged. As I think of when this happens it seems never to be with rendering the md content but with with something changing in the layouts folder like a template or a static file.
I’m pulling my hair out now because some javascript I’m editing (in a static file) can’t get a tag attribute but maybe it’s because my edits for that file are not getting into memory because I can not see any syntax error in something I have done many times.
Time to reboot to really be sure the memory is clear. I am not sure Hugo doesn’t keep using the same memory location on restart. The live reload is probably not the issue since I can clear browser cache and reload manually and still no changes.
Does Hugo server still have the original setup as an option to put build in regular folder and serve from there? I’d like to do that now while this is resolved so I can keep working.
Just to keep reporting on this. The issue comes and goes. Currently it’s gone. (after much more coding and reboots)
Sometimes I suspect it’s my javascript code but I don’t see how that could be the cause especially when it persists after disabling live reload.
Sometimes I suspect it’s some bad template or shortcode that isn’t throwing any error but is somehow keeping the build from going into the memory FS. Like I said was able to just build manually to a directory and then fire up a server on that directory and keep working so that kinda seems to dismiss this notion.
So I suppose it’s going to be impossible for now to track this down because I can’t find the conditions to reproduce the issue. If I do I’ll make a new post to bug section.