Open DreadBoy opened 5 years ago
@SukkaW
Is this really a bug? My understanding theme/scripts
load when initialize. So, even if the user adds a script after boot hexo, the script does not load.
PS: I think it would be nice if hexo have a hot-reload feature. But it requires a lot of work and I have no idea how to implement it.
@YoshinoriN Maybe I should change this to feature request
..
PS: I think it would be nice if hexo have a hot-reload feature. But it requires a lot of work and I have no idea how to implement it.
nodemon is one way to implement hot-reload in nodejs ecosystem, by restarting the server upon file change. We can implement it as an optional feature (off by default), and user can enable it if can accept few seconds of downtime.
Check List
Please check followings before submitting a new issue.
How to reproduce?
Create new helper and put it in
themes/theme_name/scripts
, for example:Start
hexo server
and edit helper file.Expected behavior
Hexo should recompile when helper files is changed.
Actual behavior
Hexo won't recompile and if I refresh page, helper still
console.log
s and returns original value.Environment & Settings
Node.js & npm version
Your site
_config.yml
(Optional)Your theme
_config.yml
(Optional)Hexo and Plugin version(
npm ls --depth 0
)Your package.json
package.json