Update to parameter instead of inner

This commit is contained in:
Aaron Crawfis 2021-04-05 13:47:28 -07:00
parent 08b8bf0c15
commit c58a9faa79
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,8 @@
{{ $color := .Get "color" | default "primary" }}
{{ $page := .Get "page" }}
{{ $link := .Get "link" | default "#" }}
{{ $text := .Get "text" }}
{{- if $page -}}{{- $link = ref . $page -}}{{- end -}}
<a class="btn btn-{{ $color }}" href="{{ $link }}" role="button">{{ .Inner | replaceRE "(.*)\n" "$1" }}</a>
<a class="btn btn-{{ $color }}" href="{{ $link }}" role="button">{{ $text }}</a>