github.com/projectcontour/contour@v1.28.2/site/themes/contour/layouts/_default/_markup/render-link.html (about)

     1  {{ $link := .Destination }}
     2  {{ $isRemote := strings.HasPrefix $link "http" }}
     3  {{- if not $isRemote -}}
     4  {{ $url := urls.Parse .Destination }}
     5  {{- if $url.Path -}}
     6  {{ $fragment := "" }}
     7  {{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
     8  {{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}}
     9  {{- end -}}
    10  <a href="{{ $link | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank"{{ end }}>{{ .Text | safeHTML }}</a>