hashobject/perun

New static task is not hot-reloading for me

Closed this issue · 2 comments

I may just be doing something wrong, my page built with static does not hot reload while other changes with collection or render reload fine.

You can reproduce in this repo: https://github.com/sooheon/sooheon.com/blob/master/src/site/layout.clj#L68

Okay, I see what's happening here. This is all internal to Perun, but we decide whether to re-render a file based on a few things, including whether the code in the rendering pod has been refreshed. Also, the tasks that take a renderer all use the same pod. Because of this, only the first renderer task in the chain will see that things have changed, and subsequent tasks will think that everything has stayed the same. In your case, collection will re-render because it's the first renderer task, but static won't.

I have an idea to fix this. Hoping it won't take long.

Okay, I opened a PR to fix this issue. I'll merge if/when the tests pass CI.