Skip to content

Commit

Permalink
gh-37589: Add links to sources in documentation
Browse files Browse the repository at this point in the history
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->

- Add a top banner to the sage doc of the stable version if the present
doc is for a develop version.
- Add small edit button (using a furo feature) to github source files
for rst files.
- Add `[source]` links to github source files in the reference manual
(using sphinx linkcode extension).
- Edited `src/sage/misc/sageinspect.py`
- Deprecate sage-classic theme (but leave theme files yet).

Fixes #35223.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
    
URL: #37589
Reported by: Kwankyu Lee
Reviewer(s):
  • Loading branch information
Release Manager committed Mar 29, 2024
2 parents 3e2ebd7 + 918ff5c commit 4daa436
Show file tree
Hide file tree
Showing 31 changed files with 371 additions and 244 deletions.
5 changes: 5 additions & 0 deletions src/doc/ca/intro/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ca/intro', '{filename}'),
})

# General information about the project.
project = "Introducció de Sage"

Expand Down
14 changes: 14 additions & 0 deletions src/doc/common/static/custom-furo.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,17 @@ a.pdf:hover {
text-decoration: none;
}

/* Style for announcement banner */

.announcement {
background: orange;
}

.announcement-content {
color: black;
}

.announcement-content a {
color: white;
text-decoration: none;
}
5 changes: 5 additions & 0 deletions src/doc/de/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/de/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = "Ein Rundgang durch Sage"
name = "a_tour_of_sage"
Expand Down
5 changes: 5 additions & 0 deletions src/doc/de/thematische_anleitungen/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/de/thematische_anleitungen', '{filename}'),
})

# General information about the project.
project = "Thematische Anleitungen"
name = 'ThematischeAnleitungen-de'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/de/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/de/tutorial', '{filename}'),
})

# General information about the project.
project = "Sage Tutorial"
name = 'SageTutorial-de'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, f'blob/develop/src/doc/en/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = "A Tour of Sage"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/constructions/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/constructions', '{filename}'),
})

# General information about the project.
project = "Constructions"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/developer/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/developer', '{filename}'),
})

# General information about the project.
project = "Developer Guide"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/faq/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/faq', '{filename}'),
})

# General information about the project.
project = "FAQ"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/installation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/installation', '{filename}'),
})

# General information about the project.
project = "Installation Guide"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/prep/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/prep', '{filename}'),
})

# General information about the project.
project = "PREP Tutorials"
copyright = "2012, Rob Beezer, Karl-Dieter Crisman, and Jason Grout"
Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
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.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/reference/index.rst'),
})

# General information about the project.
project = "Reference Manual"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/reference/conf_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
title = name.capitalize()
title = title.replace('`', '$')

# We use the directory's name to add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, f'blob/develop/src/doc/en/reference/{name}', '{filename}'),
})

# General information about the project.
project = title

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/thematic_tutorials/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/thematic_tutorials', '{filename}'),
})

# General information about the project.
project = "Thematic Tutorials"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/en/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/en/tutorial', '{filename}'),
})

# General information about the project.
project = "Tutorial"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/es/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/es/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = 'Un Tour Por Sage'
name = 'a_tour_of_sage'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/es/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/es/tutorial', '{filename}'),
})

# General information about the project.
project = "Sage Tutorial"
name = 'tutorial-es'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/fr/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/fr/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = 'Sage en quelques mots'
name = 'a_tour_of_sage'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/fr/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/fr/tutorial', '{filename}'),
})

# General information about the project.
project = "Tutoriel Sage"
name = 'tutorial-fr'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/hu/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/hu/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = 'A Sage bemutatása'
name = 'a_tour_of_sage'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/it/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/it/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = 'Esplora Sage'
name = 'a_tour_of_sage'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/it/faq/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/it/faq', '{filename}'),
})

# General information about the project.
project = "Sage FAQ"

Expand Down
5 changes: 5 additions & 0 deletions src/doc/it/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/it/tutorial', '{filename}'),
})

# General information about the project.
project = "Tutorial Sage"
name = 'tutorial-it'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/ja/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ja/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = "Sage ガイドツアー"
name = 'a_tour_of_sage'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/ja/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ja/tutorial', '{filename}'),
})

# General information about the project.
project = "Sage チュートリアル"
name = 'tutorial-jp'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/pt/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/pt/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = 'Uma Turnê pelo Sage'
name = 'a_tour_of_sage'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/pt/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/pt/tutorial', '{filename}'),
})

# General information about the project.
project = "Tutorial Sage"
name = 'tutorial-pt'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/ru/tutorial/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, 'blob/develop/src/doc/ru/tutorial', '{filename}'),
})

# General information about the project.
project = "Sage Tutorial in Russian"
name = 'tutorial-ru'
Expand Down
5 changes: 5 additions & 0 deletions src/doc/tr/a_tour_of_sage/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
# contains common paths.
html_static_path = [] + html_common_static_path

# Add a small edit button.
html_theme_options.update({
'source_edit_link': os.path.join(source_repository, f'blob/develop/src/doc/tr/a_tour_of_sage', '{filename}'),
})

# General information about the project.
project = 'Sage Turu'
name = 'a_tour_of_sage'
Expand Down
Loading

0 comments on commit 4daa436

Please sign in to comment.