Closed spanezz closed 1 year ago
Hello, does this mean that right now, everything is re-generated from scratch?
Yes, right now everything is re-generated from scratch at each site rebuild. For my use case (around 600 markdown pages), it is currently fast enough not to consider incremental rendering a priority.
Similar to how markdown caches previous renderings in .staticsite-cache
, one can track, with cooperation with jinja2 functions, the dependencies of a page. If the dependencies have not changed, we do not
need to rebuild the page
I forgot to mention: now markdown caches previous markdown→html content in .staticsite-cache, greatly speeding up previous builds. It looks like staticsite is starting to have some incremental rendering.
This is now working in the refactor
branch!
I merged refactor
to master. The links
feature cannot do incremental builds yet, but it seems reasonably fast, and not as used as the others.
Finally closing this issue :tada:
Ideas for implementing incremental rendering:
os.normpath
) to core.Page objects. This is needed both to render in-memory forssite serve
and for comparing what should be rendered with the existing contents ofweb/
git log
(or GitPython) to see which pages have changed since the last run.