Sha256: 6b648d0c4bd149867cd5923da87b65f5521bdf1c52d9b7407cb8c8376baf4a1e

Contents?: true

Size: 998 Bytes

Versions: 8

Compression:

Stored size: 998 Bytes

Contents

{% comment %}
Inserts the data-designated template into calling template at `spot`...
 REPLACES WHOLE template (if spot == 'file' & calling template is conditional)
{% endcomment %}
{% assign hook_replace_tpl = false %}
{% assign spot = include.spot | default: 'file' %}
{% assign hook = site.data.theme.extend.hooks.templates[include.template][spot] %}
{% if hook %}
  {% if spot == "file" %}
    {% assign tpl_ext = include.template | split: "_" | last %}
    {% case tpl_ext %}
      {% when "html","htm" %}
        {% assign cmt_start = "<!-- " %}
        {% assign cmt_end = " -->" %}
      {% when "yaml","yml" %}
        {% assign cmt_start = "# " %}
        {% assign cmt_end = "" %}
      {% when "asciidoc","adoc","ad" %}
        {% assign cmt_start = "// " %}
        {% assign cmt_end = "" %}
    {% endcase %}
    {% assign hook_replace_tpl = true %}
{{ cmt_start }}template replaced by hook ({{hook.template}}){{ cmt_end }}
  {% endif %}
{% include {{ hook.template }} %}
{% endif %}

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
asciidocsy-0.3.0 _includes/hook.liquid
asciidocsy-0.3.0.pre.rc4 _includes/hook.liquid
asciidocsy-0.3.0.pre.rc3 _includes/hook.liquid
asciidocsy-0.3.0.pre.rc2 _includes/hook.liquid
asciidocsy-0.3.0.pre.rc1 _includes/hook.liquid
asciidocsy-jekyll-theme-0.3.0.pre.rc2 _includes/hook.liquid
asciidocsy-jekyll-theme-0.3.0.pre.rc1 _includes/hook.liquid
asciidocsy-jekyll-theme-0.3.0.pre.dev _includes/hook.liquid