From 42413ba938dfc750bd7573fe3dfb7a2b86b8c3f9 Mon Sep 17 00:00:00 2001 From: George Melikov Date: Sat, 29 Nov 2025 20:50:17 +0300 Subject: [PATCH] Add redirect from RTD domain Signed-off-by: George Melikov --- docs/_static/js/redirect.js | 3 +++ docs/conf.py | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 docs/_static/js/redirect.js diff --git a/docs/_static/js/redirect.js b/docs/_static/js/redirect.js new file mode 100644 index 000000000..c6a0e6676 --- /dev/null +++ b/docs/_static/js/redirect.js @@ -0,0 +1,3 @@ +if (location.host == 'openzfs.readthedocs.io') { + window.location.replace("https://openzfs.github.io"); +} diff --git a/docs/conf.py b/docs/conf.py index 2ccaa3d12..56a47ed57 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -129,6 +129,10 @@ def setup(app): 'github_version': 'master/docs/' } +html_js_files = [ + 'js/redirect.js', +] + # Custom sidebar templates, must be a dictionary that maps document names # to template names. #