Page MenuHomeSoftware Heritage

D7759.id28092.diff
No OneTemporary

D7759.id28092.diff

diff --git a/docs/_static/custom.js b/docs/_static/custom.js
new file mode 100644
--- /dev/null
+++ b/docs/_static/custom.js
@@ -0,0 +1,6 @@
+$(document).ready(function () {
+ // open external link in new browser tab
+ $('a.external:not([href^="https://docs.softwareheritage.org/"])')
+ .attr('target', '_blank')
+ .attr('rel', 'noopener noreferrer');
+});
diff --git a/swh/docs/sphinx/conf.py b/swh/docs/sphinx/conf.py
--- a/swh/docs/sphinx/conf.py
+++ b/swh/docs/sphinx/conf.py
@@ -119,6 +119,8 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
+html_js_files = ["custom.js"]
+
# make logo actually appear, avoiding gotcha due to alabaster default conf.
# https://github.com/bitprophet/alabaster/issues/97#issuecomment-303722935
html_sidebars = {

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 2, 11:30 AM (1 w, 2 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218469

Event Timeline