javajbake

Does JBake 're-bake' pages which were already 'baked'?


I'd like to ask a question regarding JBake.

Does JBake have any mechanism to detect pages which are already 'baked' (ie. compiled into final output)? If so, could someone please point me the code?

I'm hoping that JBake can do this so that when the site becomes huge, it won't slow down re-baking all the pages everything it is run.

Thanks!


Solution

  • Yes it does support incremental baking, to enable this add the following to your project's jbake.properties file:

    db.store=local

    This triggers JBake to save the content store that it builds while parsing your content files to disk. The next time JBake is run it will only bake the content files that are different or have changed since the last bake - this is made possible by the content store being saved. This feature can also be used in conjunction with 'watch' mode which will automatically trigger a bake when it detects changes to content files.

    Link to relevant section of JBake documentation for incremental baking