{{ if $.Param "enableEditBtn" }}
  {{ $root := .}}
  {{ with .FirstSection }}
    <a href="{{ .Params.editBaseURL | default ($.Param "editBaseURL") }}{{ strings.TrimSuffix "/" ($root.Permalink | relLangURL) }}.md" target="_blank" rel="noreferrer">
      <button class="editBtn" aria-label="Edit This Page Button">
        {{ i18n "edit-this-page" | default "EDIT THIS PAGE" }}
      </button>
    </a>
  {{ end }}
{{ end }}