diff options
author | tdro <tdro@noreply.example.com> | 2022-11-17 11:47:06 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-11-17 11:47:06 -0500 |
commit | d29b7355f7ba99d0d03ea432a28a09e690d7d4bf (patch) | |
tree | af28949631dc5dfb607857a7b4353abbddca197c /themes | |
parent | d1bf1e226961688918a39cddbd33e3bc29aad07b (diff) | |
download | canory-d29b7355f7ba99d0d03ea432a28a09e690d7d4bf.tar.gz canory-d29b7355f7ba99d0d03ea432a28a09e690d7d4bf.tar.bz2 canory-d29b7355f7ba99d0d03ea432a28a09e690d7d4bf.zip |
themes/default/layouts/_default/_markup/render-link: Remove target="_blank"
Will cause issues later on - highlight external links with dotted underline
Diffstat (limited to 'themes')
-rw-r--r-- | themes/default/layouts/_default/_markup/render-link.html | 9 | ||||
-rw-r--r-- | themes/default/layouts/shortcodes/quote.html | 8 |
2 files changed, 6 insertions, 11 deletions
diff --git a/themes/default/layouts/_default/_markup/render-link.html b/themes/default/layouts/_default/_markup/render-link.html index 17a6f2c..8f51a57 100644 --- a/themes/default/layouts/_default/_markup/render-link.html +++ b/themes/default/layouts/_default/_markup/render-link.html @@ -7,15 +7,12 @@ {{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}} {{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .Permalink $fragment }}{{ end }}{{ end -}} {{- end -}} -<a - href="{{ $link | safeURL }}" +<a href="{{ $link | safeURL }}" {{ with or .Title ($link | safeURL) -}} title="{{ . }}" {{ end }} {{- if $isRemote -}} - target="_blank" + data-external rel="noopener no-referrer" - {{ end }}> - {{- .Text | safeHTML -}} -</a> + {{ end }}>{{- .Text | safeHTML -}}</a> {{- /* This comment removes trailing newlines and white spaces. */ -}} diff --git a/themes/default/layouts/shortcodes/quote.html b/themes/default/layouts/shortcodes/quote.html index b933286..e0048d9 100644 --- a/themes/default/layouts/shortcodes/quote.html +++ b/themes/default/layouts/shortcodes/quote.html @@ -3,11 +3,9 @@ <q cite="$cite" title="{{ $text | markdownify }}"> {{- if $cite -}} - <a rel="noopener" href="{{ $cite }}" target="_blank"> - {{- end -}} - {{ $text | markdownify }} - {{- if $cite -}} - </a> + {{- print "[" $text "](" $cite ")" | markdownify -}} + {{- else -}} + {{- $text | markdownify -}} {{- end -}} </q> {{- /* This comment removes trailing newlines and white spaces. */ -}} |