-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lume server doesn't reset computed extraData #109
Comments
Can I see the plugin? I think the event you need it And about the |
For the --watch, yes. I have a nginx running that has HTTPS on my local machine. It's also a bit annoying if I do my own file watch and rerun Lume, because i's a bit slow to redo everything (and copy files, etc) (like 1s as opposed to a 100-200ms). (nevermind the original bug here) |
Ok, I just looked your plugin and have some thoughs, but if you already solved it, ok :) And about the |
(thank you so much for the |
I have a plugin that does a Table of Contents based on Headings (h1, h2, h3... instead of tags). For this, I process() each page and extract the headings. All is good and it works fine.
The problem comes when I run lume in server/watch mode.
In that case, there doesn't seem to be way to "reset" the TOC and not double it at every reload, since I need to keep it global to all pages.
If I try as a global list, it obviously doesn't get cleared.
But if I try as part of site.extraData, it also doesn't get cleared.
I think it might be overkill to have a
site.rebuild(callback)
, but it feels like this should have a proper solution? I tried using events, butbeforeBuild
is not called all the time andbeforeUpdate
only reload some files. My current solution is to find a way to update the TOC instead of adding to it.(related, but not really, it would be really nice to have a
--watch
option that does only watch/rebuild and no HTTP server)The text was updated successfully, but these errors were encountered: