{% comment %} # ----------------------------------------------------------------------------- # ~/themes/j1/layouts/js_init_generator.html # Liquid template to generate all Javascript init scripts defined # for a layout # # Product/Info: # https://jekyll-one.com # # Copyright (C) 2019 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE # # ----------------------------------------------------------------------------- # Test data: # {{ lanes_collate | debug }} # ----------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% capture module_writer %}themes/{{site.template.name}}/procedures/layouts/module_writer.proc{% endcapture %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% assign resource_placement = include.region %} {% assign items_collate = site.data.j1_resources %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% if page.debug %} {% endif %} {% for item in items_collate %} {% assign array_name = item[0] %} {% assign array_value = item[1] %} {% assign data_type = array_value | is_type %} {% if data_type == 'array' %} {% include {{ module_writer }} region=resource_placement resources=array_value %} {% endif %} {% endfor %}