diff options
-rw-r--r-- | generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html b/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html index b6574a2..9b1ffae 100644 --- a/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html +++ b/generators/hugo/themes/tdro/layouts/_default/_markup/render-link.html @@ -8,10 +8,9 @@ {{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}} {{- end -}} <a - title="{{ $link | safeURL }}" rel="noopener" href="{{ $link | safeURL }}" - {{ with .Title }} + {{ with or .Title ($link | safeURL) -}} title="{{ . }}" {{ end }} {{- if $isRemote -}} @@ -19,4 +18,4 @@ {{ end }}> {{- .Text | safeHTML -}} </a> -{{- /* This comment removes trailing newlines. */ -}} +{{- /* This comment removes trailing newlines and white spaces. */ -}} |