File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ footer:
6464 icon : " fab fa-linkedin"
6565 url : " https://www.linkedin.com/in/jake-dearborn-15408652/"
6666
67+
6768# Defaults for pages
6869defaults :
6970 - scope :
@@ -76,6 +77,9 @@ defaults:
7677 comments : false
7778 share : false
7879 related : false
80+ # Add custom footer include for JS
81+ footer :
82+ custom : custom-footer
7983
8084# Markdown settings
8185markdown : kramdown
Original file line number Diff line number Diff line change 1+ < script src ="/assets/js/open-external-in-new-tab.js "> </ script >
Original file line number Diff line number Diff line change 1+ // This script makes all external links open in a new tab (target="_blank")
2+ // It runs after the DOM is loaded.
3+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
4+ var links = document . querySelectorAll ( 'a[href^="http"], a[href^="mailto:"]' ) ;
5+ links . forEach ( function ( link ) {
6+ // Only set target for links not on the same domain
7+ if ( ! link . href . startsWith ( window . location . origin ) ) {
8+ link . setAttribute ( 'target' , '_blank' ) ;
9+ link . setAttribute ( 'rel' , 'noopener noreferrer' ) ;
10+ }
11+ } ) ;
12+ } ) ;
You can’t perform that action at this time.
0 commit comments