Sha256: ad8e18dc185b671cb20b59a3911b4e1467d85903de3c3401b2344d526d9b3b8f

Contents?: true

Size: 1.9 KB

Versions: 5

Compression:

Stored size: 1.9 KB

Contents

{% 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 %}
<!-- [INFO   ] [j1.layout.module_generator.html       ] [resource DATA to be loaded: {{resources_collate}}] -->
{% endif %}

<!-- [INFO   ] [j1.layout.module_generator.html       ] [start processing: collect data for REGION: {{resource_placement}}, LAYOUT: {{page.layout}}] -->
{% 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 %}
<!-- [INFO   ] [j1.layout.module_generator.html       ] [end processing] -->

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
j1_template_mde-2018.4.29 _includes/themes/j1/layouts/layout_module_generator.html
j1_template_mde-2018.4.28 _includes/themes/j1/layouts/layout_module_generator.html
j1_template_mde-2018.4.27 _includes/themes/j1/layouts/layout_module_generator.html
j1_template_mde-2018.4.26 _includes/themes/j1/layouts/layout_module_generator.html
j1_template_mde-2018.4.25 _includes/themes/j1/layouts/layout_module_generator.html