jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

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

Open Sefran007 opened this issue 4 years ago • 6 comments

**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 .

Sefran007 avatar Apr 27 '21 15:04 Sefran007

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Apr 27 '21 15:04 welcome[bot]

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

roblem avatar May 09 '21 08:05 roblem

With

repository:
  url: https://gitlab.com/username/project

and

html:
  use_edit_page_button      : true
  use_repository_button     : true
  use_issues_button         : true

The use_edit_page_button and use_repository_button work. The use_issues_button goes to github instead of gitlab.

NikosAlexandris avatar Aug 10 '21 07:08 NikosAlexandris

@NikosAlexandris for me on jupyter-book 0.11.2:

  • use_edit_page_button goes to github instead of gitlab
  • use_repository_button works
  • use_issues_button partially works. It opens an issue at the gitlab repo but fails to automatically populate the issue subject field with the page name as discussed in #1333

roblem avatar Aug 18 '21 12:08 roblem

* `use_issues_button` partially works.  It opens an issue at the gitlab repo but fails to automatically populate the issue subject field with the page name as discussed in

Indeed, same behavior here.

NikosAlexandris avatar Aug 18 '21 19:08 NikosAlexandris

Experiencing the same issue.

Has any of the developers any hint, where to dig into to solve this? Especially the use_edit_page_button which links to github might be quite easy to solve, when knowing where to search for.

I would like to help, but no time to dive deep into this repo atm. At least it doesn't seem to be a simple hardcoded issue ':)

fmfreeze avatar Sep 01 '22 08:09 fmfreeze

Probably an upstream bug: https://github.com/executablebooks/sphinx-book-theme/issues/418

siko1056 avatar Sep 30 '22 03:09 siko1056