srid / emanote

Emanate a structured view of your plain-text notes
https://emanote.srid.ca
Other
813 stars 71 forks source link

Hot reload is not refreshing image files #46

Closed srid closed 3 years ago

srid commented 3 years ago

https://github.com/srid/ema/issues/42

One solution to this is to have emanote append all links to static files with a ?t=currenttime. When the hot reload event is fired for HTML (because an image file got modified), that will have the effect the changing the URL to it, due to the new timestamp query param, and so the browser will have to refresh it after morphdom patches it.

The URL query addition should happen only in dev server mode (not during static site generation).

srid commented 3 years ago

It's probably simpler to achieve this using the new pandocSpliceWithCustomClass API from https://github.com/srid/emanote/pull/45

srid commented 3 years ago

Done in #47 and released to master.