hugo-geekblog/layouts/_default/_markup/render-link.html

4 lines
269 B
HTML

{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}}
<a class="gblog-post__link{{ if $raw }}--raw{{ end }}" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- /* Drop trailing newlines */ -}}