From 9057f651fb508edf0e0488df590ed119d08a28b5b8860c7eedd1190eb6e5f571 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 8 Nov 2024 00:00:00 +0000 Subject: Change CSS styling for external links --- layouts/_default/_markup/render-link.html | 3 ++- layouts/_default/single.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'layouts/_default') diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 6cadaec..8fb3c26 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,2 +1,3 @@ {{ $emoji := cond (and (not (.Page.Params.makerefs | default true)) (.Page.Params.showlinkemoji | default true)) (emojify ":link: ") "" -}} -{{ $emoji }}{{ .Text }} \ No newline at end of file +{{ $isExternalLink := (urls.Parse .Destination).IsAbs -}} +{{ $emoji }}{{ .Text }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1bc79e4..1a8aa10 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" -}} {{- if (.Page.Params.pageinfo | default true) }}

{{ partial "pageinfo.html" . }}

-- cgit v1.2.3