You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin currently reloads the source file at a configurable frequency, and if the contents have changed the file is recompiled and rendered again. This works well if the there is only a single root file, but once include:: directives are used this is not ideal. Any edits to non-root files are only rendered when the root file contents change.
The current logic is at the bottom of loader.js, concretely in startAutoReload for the timer and fetching the root source, and reloadContent for checking if the root content has changed via an md5 hash.
I would suggest changing this slightly to fetching all included files, comparing all of them to their cached hashes, and recompiling if any of them have changed. There is no edge case to consider around newly included files, since this always requires a change in an existing file, so this will already be picked up correctly. Files being deleted can also be handled easily.
If all of this sounds reasonable and no one else is working on this yet, I'd be happy to submit a PR for this.
The text was updated successfully, but these errors were encountered:
The plugin currently reloads the source file at a configurable frequency, and if the contents have changed the file is recompiled and rendered again. This works well if the there is only a single root file, but once
include::
directives are used this is not ideal. Any edits to non-root files are only rendered when the root file contents change.The current logic is at the bottom of
loader.js
, concretely instartAutoReload
for the timer and fetching the root source, andreloadContent
for checking if the root content has changed via an md5 hash.I would suggest changing this slightly to fetching all included files, comparing all of them to their cached hashes, and recompiling if any of them have changed. There is no edge case to consider around newly included files, since this always requires a change in an existing file, so this will already be picked up correctly. Files being deleted can also be handled easily.
If all of this sounds reasonable and no one else is working on this yet, I'd be happy to submit a PR for this.
The text was updated successfully, but these errors were encountered: