{{ $releases   := site.Data.releases }}
{{ $latest     := printf "%s" (index $releases 1) }}
{{- if eq (len site.Data.releases) 1 -}}
{{- $latest = "(dev preview)" -}}
{{- end -}}
{{ $version    := index (split .File.Path "/") 1 }}
<article class="article">
  {{- if (eq $version "edge") }}
  <div class="message is-danger">
    <div class="message-body">
      This version is still under development! Latest stable release is <a href="/docs/latest">{{ $latest }}</a>
    </div>
  </div>
  {{- else if (and (ne $version "latest") (ne $version $latest)) }}
  <div class="message is-warning">
    <div class="message-body">
      These are the docs for an older version of OPA. Latest stable release is <a href="/docs/latest">{{ $latest }}</a>
    </div>
  </div>
  {{- end }}
  <div class="container">
    {{ partial "docs/hero.html" . }}

    <section class="section">
      <div class="content">
        {{ .Content }}
      </div>
      {{ if (and (not .Params.hide_feedback) (site.Params.ui.feedback.enable) (site.GoogleAnalytics)) }}
        {{ partial "feedback.html" site.Params.ui.feedback }}
      {{ end }}
      <div class="toc-padding"></div>
    </section>
  </div>
</article>