forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct config variable for enabling latest_posts on about page (alsh…
…edivat#2243) I noticed disabling latest_posts in `_config.yml` didn't work because the variable in the liquid template was seemingly incorrect. This should fix that. --------- Co-authored-by: Jake Nabasny <jake@nabasny.com>
- Loading branch information
1 parent
4952317
commit c50e968
Showing
3 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
$(document).ready(function () { | ||
// Let external links in jupyter notebooks open in new tab | ||
let jupyterNotebooks = $(".jupyter-notebook-iframe-container"); | ||
jupyterNotebooks.each(function () { | ||
let iframeBody = $(this).find("iframe").get(0).contentWindow.document.body; | ||
// Get all <a> elements in the bodyElement | ||
let links = $(iframeBody).find("a"); | ||
|
||
// Loop through each <a> element | ||
links.each(function () { | ||
// Check if the <a> element has an 'href' attribute | ||
if ($(this).attr("href")) { | ||
// Set the 'target' attribute to '_blank' to open the link in a new tab/window | ||
$(this).attr("target", "_blank"); | ||
} | ||
}); | ||
}); | ||
}); |