Disable live reload by section (condition) - live reload issue with modals

I have files being rendered that are linked from another page to appear as a modal.

Unfortunately the live-reload script appended to the end of any page to be displayed modally causes the modal javascript code to fail and the file never gets displayed.

I’d like not to disable the live reload for development (that’s how I tracked down what was causing the issue).

Is there a way currently to have Hugo apply the live-reload script selectively like say all but some section?

Not that anyone here wants to look at some javascript but here is the modal code I am using. Possibly I can change it a bit to stop the conflict?

I’ve just decided to use a simpler modal using mostly css so not an issue any more.

1 Like