From 4b952b38f3101a6c973157d28b0e26ca78b85ab0 Mon Sep 17 00:00:00 2001 From: timurgordon Date: Thu, 25 Aug 2022 10:31:43 +0300 Subject: [PATCH] link fixes --- config.toml | 2 +- templates/partials/header.html | 16 ++++++++++------ templates/shortcodes/button.html | 12 ++++++++---- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/config.toml b/config.toml index a482b14b7..0271327b9 100644 --- a/config.toml +++ b/config.toml @@ -39,7 +39,7 @@ render_emoji = false # Whether external links are to be opened in a new tab # If this is true, a `rel="noopener"` will always automatically be added for security reasons -external_links_target_blank = true +external_links_target_blank = false # Whether to set rel="nofollow" for all external links external_links_no_follow = true diff --git a/templates/partials/header.html b/templates/partials/header.html index 69e6a84cd..fc46a2cb4 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -35,9 +35,11 @@ {% set link_label = header_label | striptags %} {% set link_path = header_label | split(pat="%22") | safe%} {% if header_label is containing("http") %} - - {{link_label}} - + {% if header_label is not containing("threefold") %} + + {{link_label}} + + {% endif %} {% else %} {{link_label}} @@ -163,9 +165,11 @@ {% set link_label = header_label | striptags %} {% set link_path = header_label | split(pat="%22") | safe%} {% if header_label is containing("http") %} - - {{link_label}} - + {% if header_label is not containing("threefold") %} + + {{link_label}} + + {% endif %} {% else %} {{link_label}} diff --git a/templates/shortcodes/button.html b/templates/shortcodes/button.html index 8012b8cfe..4fffee49a 100644 --- a/templates/shortcodes/button.html +++ b/templates/shortcodes/button.html @@ -2,10 +2,14 @@ | trim_end_matches(pat='"') %} {% if 'https' in url %} - + {% if url is not containing("threefold") %} + {% if url is not containing("localhost") %} + + {% endif %} + {% endif %} {% else %}