From 59241adea21cb17c57719557bf4581b160286bdb Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Mon, 16 Jan 2023 19:13:22 +0100 Subject: [PATCH 1/3] try fixing widgets rendering --- docs/conf.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 17f76b50..21e142fb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,8 +53,18 @@ ] # -- Extension configuration ------------------------------------------------- -jupyter_execute_notebooks = "off" +nb_execution_mode = "off" myst_enable_extensions = ["colon_fence", "deflist"] +nb_ipywidgets_js = { + "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js": { + "integrity": "sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=", + "crossorigin": "anonymous" + }, + "https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@*/dist/embed-amd.js": { + "data-jupyter-widgets-cdn": "https://cdn.jsdelivr.net/npm/", + "crossorigin": "anonymous" + } +} thebe_config = { "always_load": True, @@ -123,7 +133,7 @@ { "name": "GitHub", "url": "https://github.com/arviz-devs/preliz", - "icon": "fab fa-github-square", + "icon": "fa-brands fa-github", }, ], "logo": { @@ -131,6 +141,13 @@ "image_dark": "PreliZ_flat_white.png", }, } +html_context = { + "github_user": "arviz-devs", + "github_repo": "preliz", + "github_version": "main", + "doc_path": "docs/", + "default_mode": "light", +} # -- Options for HTMLHelp output --------------------------------------------- From 7832d531ad497bc6256f0769d55dca3ef517ee5e Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Fri, 20 Jan 2023 14:15:44 +0100 Subject: [PATCH 2/3] try custom css --- docs/_static/custom.css | 3 +++ docs/conf.py | 1 + 2 files changed, 4 insertions(+) create mode 100644 docs/_static/custom.css diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000..1536f1a2 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,3 @@ +.jupyter-widgets-disconnected::before { + content: none !important; +} diff --git a/docs/conf.py b/docs/conf.py index 21e142fb..0e26353a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -108,6 +108,7 @@ # 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", "logos"] +html_css_files = ["custom.css"] # -- Options for HTML output ------------------------------------------------- From 6e86c311b839cc5b5e6a7335bc26e96387232cd0 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Fri, 20 Jan 2023 14:22:50 +0100 Subject: [PATCH 3/3] remove custom widget js --- docs/conf.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0e26353a..3bfe41b6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,16 +55,16 @@ # -- Extension configuration ------------------------------------------------- nb_execution_mode = "off" myst_enable_extensions = ["colon_fence", "deflist"] -nb_ipywidgets_js = { - "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js": { - "integrity": "sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=", - "crossorigin": "anonymous" - }, - "https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@*/dist/embed-amd.js": { - "data-jupyter-widgets-cdn": "https://cdn.jsdelivr.net/npm/", - "crossorigin": "anonymous" - } -} +# nb_ipywidgets_js = { +# "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js": { +# "integrity": "sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=", +# "crossorigin": "anonymous" +# }, +# "https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@*/dist/embed-amd.js": { +# "data-jupyter-widgets-cdn": "https://cdn.jsdelivr.net/npm/", +# "crossorigin": "anonymous" +# } +# } thebe_config = { "always_load": True,