<!DOCTYPE html>
<html lang="en">

  {% include head.html %}

  <body class="{{ page.class }} {{ page.skin }}">

    {% include header.html %}

    <main class="main-content" role="main">
      {{ content }}
    </main>

    {% include footer.html %}

    <script src="{{ "/js/main.js" | prepend: site.baseurl }}"></script>
  </body>

</html>

<!DOCTYPE html>
<html lang="en">

  {% include head.html %}

  <body class="{{ page.class }} {{ page.skin }}">

    {% include header.html %}

    <main class="main-content" role="main">
      {{ content }}
    </main>

    {% include footer.html %}

    {% if page.url != '/blog/index.html' %}
    <script src="{{ "/js/main.js" | prepend: site.baseurl }}"></script>
    {% endif %}

  </body>

</html>

Include js only if is post page
Include js only if is post page
