mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-26 02:22: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. */ -}}
|