Welcome to mirror list, hosted at ThFree Co, Russian Federation.

button.html « shortcodes « layouts - github.com/alex-shpak/hugo-book.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8ac2d7e82d0e188cd29ac8069e59184a2c77e522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{{ $ref := "" }}
{{ $target := "" }}
{{ with .Get "href" }}
  {{ $ref = . }}
  {{ $target = "_blank" }}
{{ end }}
{{ with .Get "relref" }}
  {{ $ref = relref $ . }}
{{ end }}
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
  {{ $.Inner | markdownify }}
</a>