mirror of https://github.com/docker/docs.git
13 lines
387 B
HTML
13 lines
387 B
HTML
{{ $text := .Get "text" }}
|
|
{{ $url := .Get "url" }}
|
|
{{- if (strings.HasPrefix $url "http") -}}
|
|
{{ $url = $url | safeURL }}
|
|
{{- else if (strings.FindRE `([^_]|^)index.md` $url 1) -}}
|
|
{{ $url = ref .Page (strings.Replace $url "index.md" "_index.md") }}
|
|
{{- else -}}
|
|
{{ $url = ref .Page $url }}
|
|
{{- end -}}
|
|
<div class="button not-prose">
|
|
<a href="{{ $url }}">{{ $text }}</a>
|
|
</div>
|