mirror of https://github.com/docker/docs.git
17 lines
526 B
HTML
17 lines
526 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="not-prose my-4">
|
|
<a
|
|
href="{{ $url }}"
|
|
class="cursor-pointer rounded-sm bg-blue-500 px-4 py-2 text-white hover:bg-blue-400 dark:bg-blue-800 dark:hover:bg-blue-700"
|
|
>{{ $text }}</a
|
|
>
|
|
</div>
|