{{ $currentVersion := getenv "CURRENT_VERSION" }}
{{ $versionString := getenv "VERSIONS" }}
{{ $versions := split $versionString "," }}
{{ $latestVersion := index $versions 0 }}

{{ if ne $currentVersion $latestVersion }}
  <div class="alert alert-warning">
    <i class="fa fa-warning"></i> You are looking at a doc for older version of Dgraph ({{ $currentVersion }}). The latest version is <a href="/">{{ $latestVersion }}</a>.
  </div>
{{ end }}

<article id="{{ .Slug }}">
  {{ partial "request-edit.html" . }}
  {{ partial "suggest-edit.html" . }}

  <h1 class="post-title">{{ .Title }}</h1>

  <div>{{ .Content }}</div>
</article>

{{ $currentVersion := getenv "CURRENT_VERSION" }}
{{ $versionString := getenv "VERSIONS" }}
{{ $versions := split $versionString "," }}
{{ $latestVersion := index $versions 0 }}

{{ if eq $currentVersion "master" }}
  <div class="alert alert-info">
    <i class="fa fa-warning"></i> You are looking at a doc for <code>master</code> branch. The latest release is <a href="/">{{ $latestVersion }}</a>.
  </div>
{{ else if ne $currentVersion $latestVersion }}
  <div class="alert alert-warning">
    <i class="fa fa-warning"></i> You are looking at a doc for older version of Dgraph ({{ $currentVersion }}). The latest version is <a href="/">{{ $latestVersion }}</a>.
  </div>
{{ end }}

<article id="{{ .Slug }}">
  {{ partial "request-edit.html" . }}
  {{ partial "suggest-edit.html" . }}

  <h1 class="post-title">{{ .Title }}</h1>

  <div>{{ .Content }}</div>
</article>

Implement a warning for master branch
Implement a warning for master branch
