{% comment %} # ----------------------------------------------------------------------------- # ~/themes/j1/layouts/resource_generator.html # Liquid template to generate all resource entries 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 # ----------------------------------------------------------------------------- # NOTE: # Do NOT add any RESOURCES here. Go for ... # ----------------------------------------------------------------------------- # Test data: # {{ lanes_collate | debug }} # # ----------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% capture resource_writer %}themes/{{site.template.name}}/procedures/layouts/resource_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] %} {% if array_name == 'globals' %} {% assign global_array = array_value %} {% endif %} {% include {{ resource_writer }} region=resource_placement globals=global_array resources=array_value %} {% endfor %}