Simple command to put default index.html
content in the docroot
:
[downloader]
recipe = plone.recipe.command
command = rm -r ${html5as:docroot}/*; cp ${default_index_html:rendered} ${html5as:docroot}/
[default_index_html]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_index_html'] }}
rendered = ${directory:srv}/index.html
title = {{ parameter_dict['title'] }}
context =
key title :title
A new section [default_index_html]
is added to render the template. It gets the path of the template by being rendered by instance.cfg.in
which got its path from software.cfg
.
The template is being rendered with the context key title
taken from the parameter title
.