{{ if or (hasPrefix .RelPermalink "/docs/v1/") (hasPrefix .File.Path "docs/v1/") }}
<div class="alert alert-warning legacy-banner" role="alert">
  <h4 class="alert-heading">
    <i class="fa fa-archive"></i> Legacy Documentation (v1)
  </h4>
  <p class="mb-0">
    You are viewing archived documentation. 
    {{ $newPath := replace .RelPermalink "/v1/" "/" }}
    {{ $newPath = replace $newPath "/docs/docs/" "/docs/" }}
    Please check if there is an <a href="{{ $newPath }}" class="alert-link">updated version</a> available.
  </p>
</div>
{{ end }}
