{%- comment -%} Usage: include example.html content=markup [args], where content is a capture with the HTML content args can be one of the following: id - null (default) class - "bd-example" (default) optional: hide_preview - disabled (default) optional: hide_markup - disabled (default) {%- endcomment -%} {%- assign id = include.id -%} {%- assign class = include.class -%} {% capture no_print_increment %} {% increment index_id %} {% endcapture %} {% if include.hide_preview != null or include.hide_markup != null %} {%- if include.hide_preview == null -%} {{- include.content -}} {%- if include.hide_markup == null -%} {%- highlight html -%} {%- if include.content contains ' {%- endcapture -%} {{- img_placeholder -}} {%- else -%} {{- content_chunk -}} {%- endif -%} {%- endfor -%} {%- else -%} {{- include.content -}} {%- endif -%} {%- endhighlight -%} {%- endif -%} {%- endif -%} {% else %}
{%- if include.hide_preview == null -%} {{- include.content -}}
{%- endif -%}
{%- if include.hide_markup == null -%} {%- highlight html -%} {%- if include.content contains ' {%- endcapture -%} {{- img_placeholder -}} {%- else -%} {{- content_chunk -}} {%- endif -%} {%- endfor -%} {%- else -%} {{- include.content -}} {%- endif -%} {%- endhighlight -%} {%- endif -%}
{% endif %}