HUGO

Livereload the currently edited page

A simple idea that I suspect is much more complicated to implement than it sounds…

If I edit a single page have livereload load that page.

context: I’m in the process of converting a site from Drupal to Hugo (yet again) and there is a lot of pre-existing content that’s been exported, I’m editing and cleaning up each exported page but also have to navigate to that page in the browser to view the result. This is particularly painful when exported content hasn’t yet been wired into the site navigation.

It would be a time saver if Hugo could pass the url being edited to livereload.

I haven’t tried this in a while, but I remember it working:

hugo server --navigateToChanged

See https://gohugo.io/commands/hugo_server/.

3 Likes

Interesting. It works fine with Debian 10 and Hugo v0.80.0-792EF0F4/extended linux/amd64 BuildDate: 2020-12-31T13:46:18Z

Thank you

I might have know it already existed. I had no idea hugo server had so many available flags either.
Tried:

hugo server --disableFastRender --navigateToChanged 

First build was very slow but subsequently normal on change, and yes it navigated to the changed file.

Thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.