{% comment %}<!-- json-ld Breadcrumb Schema Markup -->{% endcomment %}
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": 
  [          
      {% for crumb in crumbs offset: 1 %}
          {% if forloop.last %}
              {
              "@type": "ListItem",
              "position": {{ forloop.index }},
              "item": {
                "@id": "{{ site.url }}{{ page.url }}",
                {% assign words = crumb | remove:'.html' | split: '-'  %}
                {% capture titlecase %}{% for word in words %}{{ word | capitalize }} {% endfor %}{% endcapture %}
                "name": "{{ titlecase }}"
              }
          }
       {% else %}
        {
        "@type": "ListItem",
        "position": {{ forloop.index }},
        "item": {
          "@id": "{{ site.url }}{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}",
          {% assign words = crumb | remove:'.html' | split: '_'  %}
          {% capture titlecase %}{% for word in words %}{{ word | capitalize }} {% endfor %}{% endcapture %}
          "name": "{{ titlecase }}"
          }
        },
    {% endif %}
    {% endfor %}
  ]
  }
</script>