diff --git a/docs/_static/js/awkward.js b/docs/_static/js/awkward.js new file mode 100644 index 0000000000..cb035cee71 --- /dev/null +++ b/docs/_static/js/awkward.js @@ -0,0 +1,5 @@ +document.addEventListener("DOMContentLoaded", function() { + document.querySelectorAll('a[href="_static/try-it.html"]').forEach(a => { + a.target = "_blank"; + }); +}); diff --git a/docs/_static/try-it.html b/docs/_static/try-it.html new file mode 100644 index 0000000000..8c376b4d89 --- /dev/null +++ b/docs/_static/try-it.html @@ -0,0 +1,307 @@ + + + + + + + + + + + + +
+ + + + + + diff --git a/docs/conf.py b/docs/conf.py index e2269cba09..37faac9e39 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -137,6 +137,7 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] html_css_files = ["css/awkward.css"] +html_js_files = ["js/awkward.js"] # MyST settings myst_enable_extensions = ["colon_fence"] diff --git a/docs/index.md b/docs/index.md index 65acccccdd..68419d0f80 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,12 +28,11 @@ Awkward Array is a library for **nested, variable-sized data**, including arbitr :class: shield-badge ::: -% % Unfortunately, `target` does not support document references -% :::{image} https://img.shields.io/badge/-Try%20It%21-orange?style=for-the-badge -% :alt: Try It! -% :target: getting-started/try-awkward-array.html -% :class: shield-badge -% ::: +:::{image} https://img.shields.io/badge/-Try%20It%21%20%E2%86%97-orange?style=for-the-badge +:alt: Try It! ⭷ +:target: _static/try-it.html +:class: shield-badge +::: ::::