Change detected, rebuilding site (#11).
2024-02-21 01:02:24.103 +0800
Template changed /partials/footer/friendlinks.html
Template added /partials/footer
Total in 506 ms
Change detected, rebuilding site (#12).
2024-02-21 01:02:24.617 +0800
Template added /partials/footer
Total in 590 ms
Similarly, if you modify the template code, the actual page code will not be updated, and you need to completely restart the monitoring task.
I moved the comment above to this new topic. Adding things like “and something like this occurs” to existing topics is a distraction, and almost guarantees your “something like” will never be addressed.
With hugo v0.123.0-3c8a471390, I am unable to reproduce the problem as described when modifying content or layouts (including partials and content views). I am testing with a multilingual site, looking at both default language pages and other language pages.
I tested on Windows, again with a multilingual site. The template updates were immediately shown in the browser regardless of language.
However, content updates in the non-default language were flakey, most of the time not updating. This was with hugo v0.123.0-eceeb19. Content updates in the default language were immediately shown.
Thank you for your attention, please read the second item first, because it is too complicated to fully reproduce.
1
During installation, in areas where image acceleration is not required, you need to remove the image option on line 76 (including the trailing comma on line 75), otherwise the installation of dependencies will not be successful. In addition, you need to use Nginx, for example, to correctly resolve the baseurl address. If you like, you can try it by changing it to localhost.
My problem is that after the correct installation is completed, in the environment after executing the script on line 17, if I modify the template code, the page refresh will not respond.
This is similar to line 21.
2
I just tried it and there is no problem with line 21. The page can be automatically refreshed immediately and the code updated. I have not used this script often before.
So currently I think, the difference is in the 2 lines below.
hugo -e development --gc --watch
hugo server -e development --gc
In the hugo command line development environment, there is no update after modifying the code (you need to refresh the page manually, and the page code does not change after manual refresh)
In the development environment of the hugo server command line, the modified code is automatically updated correctly.
I understand the difference between hugo and hugo server. The problem is not whether it needs to be done manually. The problem is that the page code has not changed.
I saw with my bright eyes that the browser page code had not changed.
When I use this locally, I use nginx to access static pages and resolve the relevant domain names to local domain names by modifying the window local host file to simulate a real online environment.
This command modifies the code of the disk file system, while the hogo server command modifies the virtual file system (perhaps in memory) and does not actually modify the disk file. So I used nginx to parse the disk directory generated by hugo, and there was no problem. This was always done until v0.123.0 was released.
I’m sorry that your local NGINX setup stopped working as desired after upgrading to v0.123.0.
I suggest you find a way to make your local NGINX setup work as-is, because I can’t see us spending any time on this.
Feel free to open a new topic if you can create a minimal reproducible example that demonstrates how the --watch flag behavior changed between v0.122.0 and v0.123.0.