diff --git a/themes/tegakituesday.com/layouts/_default/_markup/render-link.html b/themes/tegakituesday.com/layouts/_default/_markup/render-link.html new file mode 100644 index 0000000..d816413 --- /dev/null +++ b/themes/tegakituesday.com/layouts/_default/_markup/render-link.html @@ -0,0 +1,16 @@ + +{{ $link := .Destination }} +{{ $isRemote := strings.HasPrefix $link "http" }} +{{- if not $isRemote -}} + {{ $url := urls.Parse .Destination }} + {{- if $url.Path -}} + {{ $fragment := "" }} + {{- with $url.Fragment }} + {{ $fragment = printf "#%s" . }} + {{ end -}} + {{- with .Page.GetPage $url.Path }} + {{ $link = printf "%s%s" .RelPermalink $fragment }} + {{ end }} + {{ end -}} +{{- end -}} +{{ .Text | safeHTML }} \ No newline at end of file