mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-14 17:42:09 +00:00
16 lines
452 B
HTML
16 lines
452 B
HTML
|
{{- $parsedTitle := dict -}}
|
||
|
{{- with .Title -}}
|
||
|
{{- $parsedTitle = partial "functions/parse-title-attribute.html" . -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
<a href="{{ .Destination | safeURL }}"
|
||
|
{{- with $parsedTitle.title }} title="{{ . }}"{{- end -}}
|
||
|
{{- with $parsedTitle.attributes -}}
|
||
|
{{- range $k, $v := . -}}
|
||
|
{{- printf " %s=%q" $k $v | safeHTMLAttr -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
>{{ .Text | safeHTML }}</a>
|
||
|
|
||
|
{{- /* Strip trailing space. */ -}}
|