hugo-book-theme/layouts/shortcodes/button.html
Nikolay Raspopov 27c1791144
Let's enable markdown in the button title (#308)
Added " | markdownify" to the inner text of button.
2021-02-19 11:55:53 +01:00

12 lines
354 B
HTML

{{ $ref := "" }}
{{ $target := "" }}
{{ with .Get "href" }}
{{ $ref = . }}
{{ $target = "_blank" }}
{{ end }}
{{ with .Get "relref" }}
{{ $ref = relref $ . }}
{{ end }}
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
{{ $.Inner | markdownify }}
</a>