--- /dev/null
+// Source: https://github.com/readthedocs/readthedocs.org/blob/f38fe0f48ed4fcfa715f647bbd073356effbb9ee/docs/_static/js/expand_tabs.js
+
+/*
+ * Expands a specific tab of sphinx-tabs.
+ * Usage:
+ * - docs.readthedocs.io/?tab=Name
+ * - docs.readthedocs.io/?tab=Name#section
+ * Where 'Name' is the title of the tab (case sensitive).
+*/
+$( document ).ready(function() {
+ const urlParams = new URLSearchParams(window.location.search);
+ const tabName = urlParams.get('tab');
+ if (tabName !== null) {
+ const tab = $('button.sphinx-tabs-tab:contains("' + tabName + '")');
+ if (tab.length > 0) {
+ tab.click();
+ }
+ }
+});
\ No newline at end of file
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['_static']
+html_static_path = ['_static']
+
+html_js_files = ['expand_tabs.js']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.