5e75227fb2
Update the formatting of links and add a Markdown render hook for handling relative internal links. Cross-references between markdown files are now resolved the same way in both GitHub and Hugo. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
5 lines
236 B
HTML
5 lines
236 B
HTML
{{- if (strings.HasPrefix .Destination "http") -}}
|
|
<a href="{{ safe.URL .Destination }}" target="_blank">{{ safe.HTML .Text }}</a>
|
|
{{- else -}}
|
|
<a href="{{ ref .Page .Destination | safe.URL }}">{{ safe.HTML .Text }}</a>
|
|
{{- end -}}
|