{% include constants.html %}
{% capture nowseconds %}{{ 'now' | date: '%s' }}{% endcapture %}
{% capture nowseconds %}{{ nowseconds | minus:time_offset }}{% endcapture %}

{% for gig in site.categories.gigs reversed %}
  {% capture gigseconds %}{{ gig.date | date: '%s' }}{% endcapture %}
  {% capture future %}{{ nowseconds | minus:gigseconds }}{% endcapture %}
  {% if future < '0' %}
    <div class="panel panel-info next-gig">
      <div class="panel-body">
        <div class="throbbing-gristle"></div>
        Next gig: <a href='{{ gig.url }}'>{{ gig.date | date: "%A %-d %B" }} at {{ gig.title }}</a>
      </div>
    </div>
    {% break %}
  {% endif %}
{% endfor %}

{% include constants.html %}
{% capture nowseconds %}{{ 'now' | date: '%s' }}{% endcapture %}
{% capture nowseconds %}{{ nowseconds | minus:time_offset }}{% endcapture %}

{% for gig in site.categories.gigs reversed %}
  {% capture gigseconds %}{{ gig.date | date: '%s' }}{% endcapture %}
  {% capture future %}{{ nowseconds | minus:gigseconds }}{% endcapture %}
  {% if future < '0' %}
    <div class="panel panel-info next-gig">
      <div class="panel-body">
        <div class="throbbing-gristle"></div>
        Next gig: <a href='{{ gig.url }}'>{{ gig.date | date: "%A %-d %B" }} at {{ gig.title }}</a>
      </div>
    </div>

    {% include json-ld.html title = gig.title date = gig.date time = gig.time location = gig.location %}

    {% break %}
  {% endif %}
{% endfor %}

Embed JSON-LD on front page
Embed JSON-LD on front page

if there’s an upcoming gig
