From 52494d9972a0bd509a17f2806adf97cc6f2ad07b Mon Sep 17 00:00:00 2001 From: ehab-hassan Date: Thu, 8 Sep 2022 13:15:21 +0200 Subject: [PATCH] recover link script --- config.toml | 6 +++--- templates/shortcodes/row.html | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.toml b/config.toml index 566716f8b..b3046bbb1 100644 --- a/config.toml +++ b/config.toml @@ -39,13 +39,13 @@ 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 = false +external_links_no_follow = true # Whether to set rel="noreferrer" for all external links -external_links_no_referrer = false +external_links_no_referrer = true # Whether smart punctuation is enabled (changing quotes, dashes, dots in their typographic form) # For example, `...` into `…`, `"quote"` into `“curly”` etc diff --git a/templates/shortcodes/row.html b/templates/shortcodes/row.html index 1e72ad2a4..5950f30ad 100644 --- a/templates/shortcodes/row.html +++ b/templates/shortcodes/row.html @@ -36,7 +36,9 @@ Parameters: {% endif %} - +{% set body = body | markdown | replace(from='href="', to='target="_blank" href="') | safe %} +{% set base_url = get_url(path="")%} +{% set body = body | markdown | replace(from='target="_blank" href="' ~ base_url , to='href="' ~ base_url) | safe %} {% set columns = body | safe | markdown | split(pat="|||") %}