Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/fast-compilation.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ <h1>Fast Compilation</h1>


<div id="content">
<p>As of Cryogen 0.4.0 <a href="https://github.com/cryogen-project/cryogen-core/pull/149">there is support for fast but partial compilation</a>. It is intended to be used when you work on a blog post or page and want to see it quickly, without re-compiling the whole site.</p><p><strong>BEWARE</strong>: This feature is only intended for "development," make sure to make a full build (f.ex. via <code>lein run</code>) before publishing your site.</p><h2 id="limitations">Limitations</h2><p>The difference from a full compilation is that the output directory is not wiped out and that only the changed markup file plus all non-page/post output files are compiled. If you change any other file, such as inside the template, a full compilation runs.</p><p>The downsides are that the previous and next links on neighboring posts will not be updated and that all derived pages such as the index, tag pages, archives, site map, and RSS will only know about this changed post/page. Thus the blog is in an inconsistent state, until a full compilation is performed.</p><p><i>(NOTE: To support a consistent incremental compilation: instead of simply filtering out unchanged files, we would need "read in" all to have the metadata but skip markup processing and output for the unchanged ones + update the neighboring posts.)</i></p><h2 id="how_to_enable">How to enable</h2><p>To enable the partial, fast compilation, use the <code>*-fast</code> variants of the serve commands:</p><pre><code>lein serve-fast
clojure -X:serve-fast
<p>As of Cryogen 0.4.0 <a href="https://github.com/cryogen-project/cryogen-core/pull/149">there is support for fast but partial compilation</a>. It is intended to be used when you work on a blog post or page and want to see it quickly, without re-compiling the whole site.</p><p><strong>BEWARE</strong>: This feature is only intended for "development," make sure to make a full build (f.ex. via <code>lein run</code>) before publishing your site.</p><h2 id="limitations">Limitations</h2><p>The difference from a full compilation is that the output directory is not wiped out and that only the changed markup file plus all non-page/post output files are compiled. If you change any other file, such as inside the template, a full compilation runs.</p><p>The downsides are that the previous and next links on neighboring posts will not be updated and that all derived pages such as the index, tag pages, archives, site map, and RSS will only know about this changed post/page. Thus the blog is in an inconsistent state, until a full compilation is performed.</p><p><i>(NOTE: To support a consistent incremental compilation: instead of simply filtering out unchanged files, we would need "read in" all to have the metadata but skip markup processing and output for the unchanged ones + update the neighboring posts.)</i></p><h2 id="how_to_enable">How to enable</h2><p>To enable the partial, fast compilation, use the <code>*:fast</code> variants of the serve commands:</p><pre><code>lein serve:fast
clojure -X:serve:fast
</code></pre><p>or, in your blog's <code>src/cryogen/server.clj</code>, replace the calls to <code>(start-watcher! dir ignored-files compile-assets-timed)</code> with <code>(start-watcher-for-changes! dir ignored-files compile-assets-timed {})</code> (notice the different function and an extra argument).</p>
</div>

Expand Down