From 54578090d6f9b04c86f05b8c93f3787c11857d5b Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:17:13 +0100 Subject: [PATCH] Docs: re-enable show sourcelink, and have it point to GH (#2803) --- sphinx/conf.py | 12 +++++++++--- sphinx/index.rst | 7 ------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sphinx/conf.py b/sphinx/conf.py index 15894a1c4..7177928c0 100644 --- a/sphinx/conf.py +++ b/sphinx/conf.py @@ -128,7 +128,13 @@ # -- Options for HTML output ---------------------------------------------- - +# Make sourcelink point to GH source rather than the raw source. +html_context = { + 'display_github': True, + 'github_user': 'metomi', + 'github_repo': 'rose', + 'github_version': 'master/sphinx/', +} html_theme = 'sphinx_rtd_theme' # rtd_theme only handles 4 levels for the sidebar navigation. html_theme_options = {'navigation_depth': 4} @@ -186,8 +192,8 @@ latex_show_pagerefs = True # If true, show URL addresses after external links. latex_show_urls = 'inline' -# Don't link RST source page. -html_show_sourcelink = False +# Link to RST source page. +html_show_sourcelink = True # Add a custom css file to make tables wrap correctly. html_css_files = ['custom.css'] diff --git a/sphinx/index.rst b/sphinx/index.rst index 89f89fc38..546682289 100644 --- a/sphinx/index.rst +++ b/sphinx/index.rst @@ -1,10 +1,3 @@ -.. ifnotslides:: - - .. raw:: html - - Fork me on GitHub - - Rose Documentation ==================