Commit 6fc4b4ed authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

html5as: Add index.html template

parent 7451ee65
......@@ -12,6 +12,7 @@ dash_location = {{ dash_location }}
template_nginx_conf = {{ template_nginx_conf_target }}
template_mime_types = {{ template_mime_types_target }}
template_launcher = {{ template_launcher_target }}
template_index_html = {{ template_index_html_target }}
[instance-html5as]
recipe = slapos.recipe.template:jinja2
......
......@@ -123,7 +123,14 @@ context =
# Simple command to put content in the docroot
[downloader]
recipe = plone.recipe.command
command = rm -r ${html5as:docroot}/*; echo "Hello World!" > ${html5as:docroot}/index.html
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
context =
key title slap-parameter:title
# Publish nginx address
[publish-connection-information]
......
......@@ -25,7 +25,7 @@ recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
filename = instance.cfg.in
md5sum = 5a6ebc126bcad3cdff1b51fb51f82a35
md5sum = d75185a0cfeced8aa41d51e1b798d9af
mode = 0644
context =
section buildout buildout
......@@ -35,13 +35,14 @@ context =
key template_mime_types_target template_mime_types:target
key template_launcher_target template_launcher:target
key template_instance_html5as_target instance_html5as:target
key template_index_html_target template_index_html:target
# Download instance_html5as.cfg.in
[instance_html5as]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
_update_hash_filename_ = instance_html5as.cfg.in
md5sum = 641422ff697f68296f8965ffe176b042
md5sum = 9c023bac9fb0db71213c5d31bd6a0b6b
mode = 0644
[template_nginx_conf]
......@@ -65,6 +66,13 @@ _update_hash_filename_ = templates/mime_types.in
md5sum = 4ef94a7b458d885cd79ba0b930a5727e
mode = 0644
[template_index_html]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
_update_hash_filename_ = templates/index.html.in
md5sum = d57cb01df5941e139b02a2f7bdabcdc8
mode = 0644
# Pin versions of eggs used that are not already pinned by stack/slapos.cfg
[versions]
slapos.recipe.template = 4.4
{% if title %}
<h1>{{ title }}</h1>
{% endif %}
<p>Hello World</p>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment