From 2455759bd804ce81940bec7b28e079a5443a4228 Mon Sep 17 00:00:00 2001 From: Fidel Ramos Date: Sun, 27 Oct 2019 14:09:43 +0000 Subject: [PATCH] LINKS_IN_NEW_TAB setting This setting can be modified to open all LINKS in the same window, open all LINKS in a new window or only only external links in new windows. --- docs/pelicanconf.py | 6 ++++++ templates/base.html | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/pelicanconf.py b/docs/pelicanconf.py index aaf822b..b719d18 100644 --- a/docs/pelicanconf.py +++ b/docs/pelicanconf.py @@ -39,6 +39,12 @@ USE_FOLDER_AS_CATEGORY = False MAIN_MENU = True HOME_HIDE_TAGS = True +# Valid values for LINKS_IN_NEW_TAB: +# * Unset, None, True or any string to open all LINKS in a new window (default) +# * 'no', 'none', False or 0 to open all LINKS in the same window +# * 'external' to open LINKS to external sites in a new window, internal links in same window +LINKS_IN_NEW_TAB = 'external' + SOCIAL = ( ('github', 'https://github.com/alexandrevicenzi/Flex'), ('rss', '/blog/feeds/all.atom.xml'), diff --git a/templates/base.html b/templates/base.html index bd85276..eb18b29 100644 --- a/templates/base.html +++ b/templates/base.html @@ -107,18 +107,24 @@ {% if pages or LINKS %}