question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sphinx-book-theme option "repository_url" and "use_edit_page_button" bug with Gitlab button edit link

See original GitHub issue

**After activate “use_repository_button”: True, “use_issues_button”: True, with gitlab all working well. Only “use_edit_page_button”: True, bug with Gitlab button edit link **

Sphinx html doc return bad link edit option : https://github.com/utilisateur/initiation_developpement_python_pour_administrateur/edit/master/docs/sources-documents/index.rst

The correct link is : http://gitlab.domaine-perso.fr/utilisateur/initiation_developpement_python_pour_administrateur/edit/master/docs/sources-documents/index.rst

Sphinx book theme don’t replace https://github.com with http://gitlab.domaine-perso.fr

**File theme configuration with conf.py from sphinx : … html_theme = ‘sphinx_book_theme’ html_theme_options = { “repository_url”: “http://gitlab.domaine-perso.fr/utilisateur/initiation_developpement_python_pour_administrateur”, “use_repository_button”: True, “use_issues_button”: True, “use_edit_page_button”: True, #“repository_branch”: “master”, “path_to_docs”: “docs/sources-documents”, “use_download_button”: True, “use_fullscreen_button”: True, “home_page_in_toc”: False, “toc_title”: “Titre panneau latéral droite”, “extra_navbar”: “

Mon HTML de navigation

”, } html_title = “Documentation développement python pour l’administrateur” html_logo = “images/logo.png” html_favicon = “images/favicon.png” **

Steps to reproduce the behavior:

  1. Go to Gitlab (Github ?) icon.
  2. Scroll down to “suggested modification”
  3. Click on suggested modification
  4. See link error

Click return correct URL http://gitlab.domaine-perso.fr/utilisateur/initiation_developpement_python_pour_administrateur/edit/master/docs/sources-documents/index.rst and replace https://github.com with http://gitlab.domaine-perso.fr

Environment

  • Python Version [3.9.4]:
  • Package version of sphinx-book-theme 0.1.0`:
  • Operating System: Kubuntu 21.04

Sphinx doc conf select to french langage

Gitlab is locally installed .

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

1reaction
roblemcommented, May 9, 2021

Seeing this as well, even with

repository:
  url: https://gitlab.com/username/project
  path_to_book: book  # An optional path to your book, defaults to repo root
html:
  # Launch button settings
  use_edit_page_button: true

in _config.yml

0reactions
siko1056commented, Sep 30, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Add buttons to link to your source - Sphinx Book Theme
There are a collection of buttons that you can use to link back to your source repository. This lets users browse the repository,...
Read more >
Disable rather than hiding edit button when a file cannot be ...
Problem to solve. Going to a repo where you don't have push access and merge requests are disabled, and then to a specific...
Read more >
Removing the Edit on Github link when using Read The Docs ...
I'm trying to find out how to use the _template overrides option in Sphinx to override the default ReadTheDocs theme ...
Read more >
Adding an edit button - Furo - Pradyun Gedam
Furo can add a small edit button to each document. With popular VCS hosts#. Provide the relevant VCS variables, by setting the following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found