Try the following method.
In your pages.yml:
in pages:... section, compose link title as actual title|href (I found handy to mark external links with 🗗 Unicode character), for example - 'Google 🗗|http://www.google.com/': 'index.md'
(just pretend it's local file, it only must be existing md)
in extra_javascript:... section, declare file with following code:
varanchors=Array.from(document.getElementsByClassName("navbar-collapse")[0].getElementsByTagName("a"));anchors.forEach(function(anchor){varsep=anchor.innerText.indexOf("|");if(sep!=-1){anchor.href=anchor.innerText.substring(sep+1,anchor.innerText.length);anchor.innerText=anchor.innerText.substring(0,sep);}if(anchor.innerText.indexOf("\uD83D\uDDD7")!=-1){// 🗗 = "new window" char, see http://www.fileformat.info/info/unicode/char/1f5d7/index.htmanchor.target="_blank";}});
Try the following method.
In your pages.yml:
in pages:... section, compose link title as actual title|href (I found handy to mark external links with 🗗 Unicode character), for example - 'Google 🗗|http://www.google.com/': 'index.md'
(just pretend it's local file, it only must be existing md)
in extra_javascript:... section, declare file with following code: