From f7b64b274ad91f23b1d669940c4059eb4dafff3e Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 30 Jul 2024 21:18:09 +0900 Subject: [PATCH 1/3] Add view/edit buttons --- src/doc/ca/intro/conf.py | 5 +++-- src/doc/de/a_tour_of_sage/conf.py | 5 +++-- src/doc/de/thematische_anleitungen/conf.py | 5 +++-- src/doc/de/tutorial/conf.py | 5 +++-- src/doc/en/a_tour_of_sage/conf.py | 5 +++-- src/doc/en/constructions/conf.py | 5 +++-- src/doc/en/developer/conf.py | 5 +++-- src/doc/en/faq/conf.py | 5 +++-- src/doc/en/installation/conf.py | 5 +++-- src/doc/en/prep/conf.py | 5 +++-- src/doc/en/reference/conf.py | 5 +++-- src/doc/en/reference/conf_sub.py | 5 +++-- src/doc/en/thematic_tutorials/conf.py | 5 +++-- src/doc/en/tutorial/conf.py | 5 +++-- src/doc/es/a_tour_of_sage/conf.py | 5 +++-- src/doc/es/tutorial/conf.py | 5 +++-- src/doc/fr/a_tour_of_sage/conf.py | 5 +++-- src/doc/fr/tutorial/conf.py | 5 +++-- src/doc/hu/a_tour_of_sage/conf.py | 5 +++-- src/doc/it/a_tour_of_sage/conf.py | 5 +++-- src/doc/it/faq/conf.py | 5 +++-- src/doc/it/tutorial/conf.py | 5 +++-- src/doc/ja/a_tour_of_sage/conf.py | 5 +++-- src/doc/ja/tutorial/conf.py | 5 +++-- src/doc/pt/a_tour_of_sage/conf.py | 5 +++-- src/doc/pt/tutorial/conf.py | 5 +++-- src/doc/ru/tutorial/conf.py | 5 +++-- src/doc/tr/a_tour_of_sage/conf.py | 5 +++-- src/sage_docbuild/conf.py | 7 ++++--- 29 files changed, 88 insertions(+), 59 deletions(-) diff --git a/src/doc/ca/intro/conf.py b/src/doc/ca/intro/conf.py index e46ebfb8c8d..71d81dcdbf3 100644 --- a/src/doc/ca/intro/conf.py +++ b/src/doc/ca/intro/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ca/intro', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/ca/intro', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/ca/intro', '{filename}'), }) # General information about the project. diff --git a/src/doc/de/a_tour_of_sage/conf.py b/src/doc/de/a_tour_of_sage/conf.py index 33f9e9642b7..71fc7ef9012 100644 --- a/src/doc/de/a_tour_of_sage/conf.py +++ b/src/doc/de/a_tour_of_sage/conf.py @@ -22,9 +22,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/de/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/de/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/de/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/de/thematische_anleitungen/conf.py b/src/doc/de/thematische_anleitungen/conf.py index d3a843c30bd..337f1a98c68 100644 --- a/src/doc/de/thematische_anleitungen/conf.py +++ b/src/doc/de/thematische_anleitungen/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/de/thematische_anleitungen', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/de/thematische_anleitungen', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/de/thematische_anleitungen', '{filename}'), }) # General information about the project. diff --git a/src/doc/de/tutorial/conf.py b/src/doc/de/tutorial/conf.py index fe4c5b0d3e1..399a915e9f4 100644 --- a/src/doc/de/tutorial/conf.py +++ b/src/doc/de/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/de/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/de/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/de/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/a_tour_of_sage/conf.py b/src/doc/en/a_tour_of_sage/conf.py index 38184747c9f..7cf31297409 100644 --- a/src/doc/en/a_tour_of_sage/conf.py +++ b/src/doc/en/a_tour_of_sage/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, f'blob/develop/src/doc/en/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, f'blob/develop/src/doc/en/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, f'edit/develop/src/doc/en/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/constructions/conf.py b/src/doc/en/constructions/conf.py index 13743e5b276..b6bbbbaab3b 100644 --- a/src/doc/en/constructions/conf.py +++ b/src/doc/en/constructions/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/constructions', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/constructions', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/constructions', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/developer/conf.py b/src/doc/en/developer/conf.py index 58e0ca995b7..e8877d61770 100644 --- a/src/doc/en/developer/conf.py +++ b/src/doc/en/developer/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/developer', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/developer', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/developer', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/faq/conf.py b/src/doc/en/faq/conf.py index fab823b6592..4c8a71bd9d1 100644 --- a/src/doc/en/faq/conf.py +++ b/src/doc/en/faq/conf.py @@ -22,9 +22,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/faq', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/faq', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/faq', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/installation/conf.py b/src/doc/en/installation/conf.py index 41f91e228d0..ea6956d2678 100644 --- a/src/doc/en/installation/conf.py +++ b/src/doc/en/installation/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/installation', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/installation', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/installation', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/prep/conf.py b/src/doc/en/prep/conf.py index 3dc26674397..645d451644d 100644 --- a/src/doc/en/prep/conf.py +++ b/src/doc/en/prep/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/prep', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/prep', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/prep', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/reference/conf.py b/src/doc/en/reference/conf.py index d9bb5da5acb..984c43363f2 100644 --- a/src/doc/en/reference/conf.py +++ b/src/doc/en/reference/conf.py @@ -25,9 +25,10 @@ ref_src = os.path.join(SAGE_DOC_SRC, 'en', 'reference') ref_out = os.path.join(SAGE_DOC, 'html', 'en', 'reference') -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/reference/index.rst'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/reference/index.rst'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/reference/index.rst'), }) # General information about the project. diff --git a/src/doc/en/reference/conf_sub.py b/src/doc/en/reference/conf_sub.py index 8346b13c9f4..479e9c306d2 100644 --- a/src/doc/en/reference/conf_sub.py +++ b/src/doc/en/reference/conf_sub.py @@ -42,9 +42,10 @@ title = name.capitalize() title = title.replace('`', '$') -# We use the directory's name to add a small edit button. +# We use the directory's name to add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, f'blob/develop/src/doc/en/reference/{name}', '{filename}'), + 'source_view_link': os.path.join(source_repository, f'blob/develop/src/doc/en/reference/{name}', '{filename}'), + 'source_edit_link': os.path.join(source_repository, f'edit/develop/src/doc/en/reference/{name}', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/thematic_tutorials/conf.py b/src/doc/en/thematic_tutorials/conf.py index 19f9a3da5af..cb6d1662f47 100644 --- a/src/doc/en/thematic_tutorials/conf.py +++ b/src/doc/en/thematic_tutorials/conf.py @@ -22,9 +22,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/thematic_tutorials', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/thematic_tutorials', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/thematic_tutorials', '{filename}'), }) # General information about the project. diff --git a/src/doc/en/tutorial/conf.py b/src/doc/en/tutorial/conf.py index 7b475a3bb6e..b566ec19677 100644 --- a/src/doc/en/tutorial/conf.py +++ b/src/doc/en/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/en/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/en/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/es/a_tour_of_sage/conf.py b/src/doc/es/a_tour_of_sage/conf.py index b6f43afd2da..dee2afa4d66 100644 --- a/src/doc/es/a_tour_of_sage/conf.py +++ b/src/doc/es/a_tour_of_sage/conf.py @@ -22,9 +22,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/es/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/es/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/es/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/es/tutorial/conf.py b/src/doc/es/tutorial/conf.py index 913dfc06025..43e23fdc568 100644 --- a/src/doc/es/tutorial/conf.py +++ b/src/doc/es/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/es/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/es/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/es/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/fr/a_tour_of_sage/conf.py b/src/doc/fr/a_tour_of_sage/conf.py index 19c047882bf..af1f453f3e4 100644 --- a/src/doc/fr/a_tour_of_sage/conf.py +++ b/src/doc/fr/a_tour_of_sage/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/fr/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/fr/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/fr/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/fr/tutorial/conf.py b/src/doc/fr/tutorial/conf.py index 87c13353111..af70d3eb4ff 100644 --- a/src/doc/fr/tutorial/conf.py +++ b/src/doc/fr/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/fr/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/fr/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/fr/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/hu/a_tour_of_sage/conf.py b/src/doc/hu/a_tour_of_sage/conf.py index 590be9195cb..b097f56dfe0 100644 --- a/src/doc/hu/a_tour_of_sage/conf.py +++ b/src/doc/hu/a_tour_of_sage/conf.py @@ -22,9 +22,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/hu/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/hu/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/hu/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/it/a_tour_of_sage/conf.py b/src/doc/it/a_tour_of_sage/conf.py index 6d217dee7ec..d06280ece36 100644 --- a/src/doc/it/a_tour_of_sage/conf.py +++ b/src/doc/it/a_tour_of_sage/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/it/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/it/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/it/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/it/faq/conf.py b/src/doc/it/faq/conf.py index c2cd668d0f8..e3898184a1f 100644 --- a/src/doc/it/faq/conf.py +++ b/src/doc/it/faq/conf.py @@ -22,9 +22,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/it/faq', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/it/faq', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/it/faq', '{filename}'), }) # General information about the project. diff --git a/src/doc/it/tutorial/conf.py b/src/doc/it/tutorial/conf.py index 13bfa100034..15186edb4ba 100644 --- a/src/doc/it/tutorial/conf.py +++ b/src/doc/it/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/it/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/it/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/it/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/ja/a_tour_of_sage/conf.py b/src/doc/ja/a_tour_of_sage/conf.py index 105cae0a93d..e8ec7cca39b 100644 --- a/src/doc/ja/a_tour_of_sage/conf.py +++ b/src/doc/ja/a_tour_of_sage/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ja/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/ja/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/ja/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/ja/tutorial/conf.py b/src/doc/ja/tutorial/conf.py index ef32faab6b8..9002593de99 100644 --- a/src/doc/ja/tutorial/conf.py +++ b/src/doc/ja/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ja/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/ja/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/ja/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/pt/a_tour_of_sage/conf.py b/src/doc/pt/a_tour_of_sage/conf.py index 075e2d7a4f5..267d499ca64 100644 --- a/src/doc/pt/a_tour_of_sage/conf.py +++ b/src/doc/pt/a_tour_of_sage/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/pt/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/pt/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/pt/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/doc/pt/tutorial/conf.py b/src/doc/pt/tutorial/conf.py index 13582d8b896..a5cabc5b0d1 100644 --- a/src/doc/pt/tutorial/conf.py +++ b/src/doc/pt/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/pt/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/pt/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/pt/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/ru/tutorial/conf.py b/src/doc/ru/tutorial/conf.py index 5ff38a94d50..5d39f7d2600 100644 --- a/src/doc/ru/tutorial/conf.py +++ b/src/doc/ru/tutorial/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ru/tutorial', '{filename}'), + 'source_view_link': os.path.join(source_repository, 'blob/develop/src/doc/ru/tutorial', '{filename}'), + 'source_edit_link': os.path.join(source_repository, 'edit/develop/src/doc/ru/tutorial', '{filename}'), }) # General information about the project. diff --git a/src/doc/tr/a_tour_of_sage/conf.py b/src/doc/tr/a_tour_of_sage/conf.py index c1854ee2f42..b7536470bd4 100644 --- a/src/doc/tr/a_tour_of_sage/conf.py +++ b/src/doc/tr/a_tour_of_sage/conf.py @@ -20,9 +20,10 @@ # contains common paths. html_static_path = [] + html_common_static_path -# Add a small edit button. +# Add small view/edit buttons. html_theme_options.update({ - 'source_edit_link': os.path.join(source_repository, f'blob/develop/src/doc/tr/a_tour_of_sage', '{filename}'), + 'source_view_link': os.path.join(source_repository, f'blob/develop/src/doc/tr/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, f'edit/develop/src/doc/tr/a_tour_of_sage', '{filename}'), }) # General information about the project. diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 50d56ccfd05..c351955497c 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -694,8 +694,8 @@ def add_page_context(app, pagename, templatename, context, doctree): context['reference_root'] = os.path.join(relpath, 'index.html') context['refsub'] = True if pagename.startswith('sage/'): - # This is for adding small edit button using Furo's feature: - # https://pradyunsg.me/furo/customisation/edit-button/#adding-an-edit-button + # This is for adding small view/edit buttons using Furo's feature: + # https://pradyunsg.me/furo/customisation/top-of-page-buttons/ # 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 tweak @@ -703,7 +703,8 @@ def add_page_context(app, pagename, templatename, context, doctree): # source files are generated. suffix = '.py' if importlib.import_module(pagename.replace('/','.')).__file__.endswith('.py') else '.pyx' context['page_source_suffix'] = suffix - context['theme_source_edit_link'] = os.path.join(source_repository, f'blob/develop/src', '{filename}') + context['theme_source_view_link'] = os.path.join(source_repository, f'blob/develop/src', '{filename}') + context['theme_source_edit_link'] = os.path.join(source_repository, f'edit/develop/src', '{filename}') dangling_debug = False From ecb754cd6dddbfa018a6dc8def8dc8b0bcefbc5a Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 30 Jul 2024 21:36:10 +0900 Subject: [PATCH 2/3] Treat greek docs --- src/doc/el/a_tour_of_sage/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/doc/el/a_tour_of_sage/conf.py b/src/doc/el/a_tour_of_sage/conf.py index f451fdf5ab8..5548c31525e 100644 --- a/src/doc/el/a_tour_of_sage/conf.py +++ b/src/doc/el/a_tour_of_sage/conf.py @@ -20,6 +20,12 @@ # contains common paths. html_static_path = [] + html_common_static_path +# Add small view/edit buttons. +html_theme_options.update({ + 'source_view_link': os.path.join(source_repository, f'blob/develop/src/doc/el/a_tour_of_sage', '{filename}'), + 'source_edit_link': os.path.join(source_repository, f'edit/develop/src/doc/el/a_tour_of_sage', '{filename}'), +}) + # General information about the project. project = 'Περιήγηση στο Sage' name = 'a_tour_of_sage' From 298fd668b656d38b80ac26817d3d8cdbc47a0a0a Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 30 Jul 2024 23:50:03 +0900 Subject: [PATCH 3/3] Upgrade furo --- build/pkgs/furo/checksums.ini | 4 ++-- build/pkgs/furo/package-version.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/pkgs/furo/checksums.ini b/build/pkgs/furo/checksums.ini index 861c13f47b0..eaeef993c08 100644 --- a/build/pkgs/furo/checksums.ini +++ b/build/pkgs/furo/checksums.ini @@ -1,4 +1,4 @@ tarball=furo-VERSION-py3-none-any.whl -sha1=f43dad408126f23ec5c480ad993e42335ca47713 -sha256=490a00d08c0a37ecc90de03ae9227e8eb5d6f7f750edf9807f398a2bdf2358de +sha1=de4aa7aff48696580d62abed717bf1c309af10f5 +sha256=b192c7c1f59805494c8ed606d9375fdac6e6ba8178e747e72bc116745fb7e13f upstream_url=https://pypi.io/packages/py3/f/furo/furo-VERSION-py3-none-any.whl diff --git a/build/pkgs/furo/package-version.txt b/build/pkgs/furo/package-version.txt index eedc5a2915f..e5180600d9a 100644 --- a/build/pkgs/furo/package-version.txt +++ b/build/pkgs/furo/package-version.txt @@ -1 +1 @@ -2024.5.6 +2024.7.18