<p>A build program is responsible for converting a <ahref="../../db/obj/"class="ref">Source Object</a> into final build artifacts. Typically such a build
program implements two methods: <ahref="produce-artifacts/"class="ref">produce_artifacts</a>
and <ahref="build-artifact/"class="ref">build_artifact</a>.</p>
<p>The former should invoke <ahref="declare-artifact/"class="ref">declare_artifact</a> for each
artifact that should be created from the source. The builder will then
invoke <ahref="build-artifact/"class="ref">build_artifact</a> for each of these declared
artifacts if the builder determiend that the artifact needs to be built.</p>
<p>For an example refer to the <ahref="../../environment/add-build-program/"class="ref">add_build_program</a> documentation.</p>
<divclass="child-pages nocontent">
<divclass="row">
<divclass="col-md-6 child">
<h4>
<iclass="glyphicon glyphicon-cog"></i>
<ahref="build-artifact/">build_artifact()</a>
</h4>
<pclass="summary">Invoked to build a previously declared artifact.</p>
</div>
<divclass="col-md-6 child">
<h4>
<iclass="glyphicon glyphicon-cog"></i>
<ahref="declare-artifact/">declare_artifact()</a>
</h4>
<pclass="summary">Declares an artifact to build from this program.</p>
Please enable JavaScript to view the <ahref="https://disqus.com/?ref_noscript"
rel="nofollow">comments powered by Disqus.</a>
</noscript>
</div>
</div>
</div>
</div>
</div>
<divclass="bottomsummary">
<divclass="container">
</div>
</div>
<footer>
<divclass="container">
<divclass="row">
<divclass="col-sm-4 icon-bar">
<ahref="https://github.com/lektor/lektor/"title="Lektor on GitHub"
><iclass="fa fa-github"></i></a>
<ahref="https://github.com/lektor/lektor/issues/"title="Report Issues for Lektor"
><iclass="fa fa-bug"></i></a>
<ahref="https://twitter.com/getlektor"title="Find Lektor on Twitter"
><iclass="fa fa-twitter"></i></a>
<ahref="https://gitter.im/lektor/lektor"title="Chat on Gitter"
><iclass="fa fa-comment"></i></a>
<ahref="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/program/contents.lr"title="View source for this page"><iclass="fa fa-code"></i></a>