From f74ab3787fb0cb74a9458aee4010de8d2f4e99fd Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sat, 1 Jun 2024 02:55:40 +0900 Subject: [PATCH 1/2] Use develop not version for source link --- src/sage_docbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index b07c4ed17e2..953b86f3190 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -399,7 +399,7 @@ def linkcode_resolve(domain, info): anchor = f'#L{lineno}' else: anchor = '' - return f"{source_repository}blob/{version}/src/{filename}{anchor}" + return f"{source_repository}blob/develop/src/{filename}{anchor}" return None From 1d0343e70d1a0b9f70d2f580bbc52b5ec4801961 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sat, 1 Jun 2024 02:59:29 +0900 Subject: [PATCH 2/2] Misc edits --- src/doc/common/static/jupyter-sphinx-furo.js | 5 +++-- src/sage_docbuild/conf.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/doc/common/static/jupyter-sphinx-furo.js b/src/doc/common/static/jupyter-sphinx-furo.js index 01839aa4e99..a43a7c8b122 100644 --- a/src/doc/common/static/jupyter-sphinx-furo.js +++ b/src/doc/common/static/jupyter-sphinx-furo.js @@ -45,7 +45,7 @@ function handlePrefersColorSchemeChange(e) { prefersDarkMode.addEventListener('change', handlePrefersColorSchemeChange); -// Change the editor theme of a new CodeMirror cell. +// Change the editor theme of a new CodeMirror cell const callback = function(mutationsList, observer) { for(const mutation of mutationsList) { if (mutation.type === 'childList') { @@ -113,7 +113,8 @@ thebelab.on("status", function (evt, data) { } }); -// Activate Thebe when "Sage (live)" tab is clicked + +// Activate Thebe when "Sage Live" tab is clicked document.querySelectorAll('input[class="tab-input"]').forEach((elem) => { elem.addEventListener("click", function(event) { if (elem.nextElementSibling) { diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 953b86f3190..6c7d981293b 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -680,7 +680,7 @@ def add_page_context(app, pagename, templatename, context, doctree): # https://pradyunsg.me/furo/customisation/edit-button/#adding-an-edit-button # This works well if the source file is '.rst' file. But the '.rst' # files in the directory 'sage/' are generated by the Sphinx - # autodoc from the Python or Cython source files. Hence we teak + # autodoc from the Python or Cython source files. Hence we tweak # here template context variables so that links to the correct # source files are generated. suffix = '.py' if importlib.import_module(pagename.replace('/','.')).__file__.endswith('.py') else '.pyx'