Commit f43de05f authored by Lisa Casino's avatar Lisa Casino

html5as: add index.html template

parent 7174cf4a
...@@ -11,14 +11,15 @@ nginx_location = {{ nginx_location }} ...@@ -11,14 +11,15 @@ nginx_location = {{ nginx_location }}
dash_location = {{ dash_location }} dash_location = {{ dash_location }}
template_nginx_conf = {{ template_nginx_conf_target }} template_nginx_conf = {{ template_nginx_conf_target }}
template_mime_types = {{ template_mime_types_target }} template_mime_types = {{ template_mime_types_target }}
template_launcher = {{ template_launcher_target }} template_launcher = {{ template_launcher_target }}
template_index_html = {{ template_index_html_target }}
[instance-html5as] [instance-html5as]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_instance_html5as_target }} template = {{ template_instance_html5as_target }}
rendered = ${buildout:directory}/${:filename} rendered = ${buildout:directory}/${:filename}
filename = instance-html5as.cfg filename = instance-html5as.cfg
context = context =
section buildout buildout section buildout buildout
section parameter_list profile-common section parameter_list profile-common
key ipv6_random slap-configuration:ipv6-random key ipv6_random slap-configuration:ipv6-random
......
...@@ -122,10 +122,16 @@ mode = 700 ...@@ -122,10 +122,16 @@ mode = 700
context = context =
section param_html5as html5as section param_html5as html5as
# Simple command to put content in the docroot
[downloader] [downloader]
recipe = plone.recipe.command 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 =
raw title {{ parameter_dict['title'] }}
# Publish nginx address # Publish nginx address
[publish-connection-information] [publish-connection-information]
......
...@@ -27,7 +27,7 @@ recipe = slapos.recipe.template:jinja2 ...@@ -27,7 +27,7 @@ recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} template = ${:_profile_base_location_}/${:filename}
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 19ad0dc9229bb15c1f618b0e93c00799 md5sum = fcf4e71c8ff0cd60138cd608bda51055
mode = 0644 mode = 0644
context = context =
section buildout buildout section buildout buildout
...@@ -37,13 +37,14 @@ context = ...@@ -37,13 +37,14 @@ context =
key template_mime_types_target template_mime_types:target key template_mime_types_target template_mime_types:target
key template_launcher_target template_launcher:target key template_launcher_target template_launcher:target
key template_instance_html5as_target instance_html5as:target key template_instance_html5as_target instance_html5as:target
key template_index_html_target template_index_html:target
# Download instance_html5as.cfg.in # Download instance_html5as.cfg.in
[instance_html5as] [instance_html5as]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_} url = ${:_profile_base_location_}/${:_update_hash_filename_}
_update_hash_filename_ = instance_html5as.cfg.in _update_hash_filename_ = instance_html5as.cfg.in
md5sum = 5aa11c226d22965260b2715ed3534524 md5sum = 54ee209baa8205eaffd62b7e942242e3
mode = 0644 mode = 0644
[template_nginx_conf] [template_nginx_conf]
...@@ -67,6 +68,13 @@ _update_hash_filename_ = templates/mime_types.in ...@@ -67,6 +68,13 @@ _update_hash_filename_ = templates/mime_types.in
md5sum = 4ef94a7b458d885cd79ba0b930a5727e md5sum = 4ef94a7b458d885cd79ba0b930a5727e
mode = 0644 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
[extra-eggs] [extra-eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
......
{% 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