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.

Suggest edit seems to be hardwired to github.

See original GitHub issue

Describe the bug Relevant sections of _config.yaml

# Location of book
repository:
  url          : "Github Enterprise URL to repo" (not github.com)
  path_to_book : ""
  branch       : master

# HTML-specific settings
html:
  use_repository_button    : true
  use_issues_button        : true
  use_edit_page_button     : true

After building and publishing using gh-pages as described in the documentation, the book publishes as expected. However, when selecting the suggest edit dropdown from the octocat The browser attempts to reach my org/repo on Github instead on our GHE instance.

To Reproduce

Steps to reproduce the behavior:

  1. Create book on a Github Enterprise server
  2. git pull
  3. cd to local repo.
  4. jupyter-book build .
  5. ghp-import -n -p -f _build/htmljupyter
  6. Enter gh-pages URL in new browser tab
  7. Navigate to an editable page.
  8. Click on octocat and select “suggest edit”

Expected behavior

I expected it to take me to the current source on GHE, for suggesting an edit. Probably allowing the creation of a PR.

Environment

  • Python Version: 3.7.7
jupyter-book --version
Jupyter Book: 0.7.5
MyST-NB: 0.8.5
Sphinx Book Theme: 0.0.36
MyST-Parser: 0.9.1
Jupyter-Cache: 0.3.0
  • Operating System: Linux 3.10.0-1062.4.1.el7.x86_64 #1 SMP Wed Sep 25 09:42:57 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux

Additional context

The Open issue dropdown behaved as expected.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
parthb102commented, Mar 4, 2021

If anyone is still interested in this the easiest way I’ve found to change the GitHub binding is: Go to https://github.com/executablebooks/jupyter-book/blob/35041ee32886057873a3bc8ec503eb202dabea67/jupyter_book/config.py#L44

After this line add the code: html_context = { “github_url”: “<enter link to your git repo>”, },

This will add the updated git link to the Sphinx book theme and the URL should work correctly

0reactions
NikosAlexandriscommented, Aug 10, 2021

If anyone is still interested in this the easiest way I’ve found to change the GitHub binding is: Go to

https://github.com/executablebooks/jupyter-book/blob/35041ee32886057873a3bc8ec503eb202dabea67/jupyter_book/config.py#L44

After this line add the code: html_context = { “github_url”: “”, },

This will add the updated git link to the Sphinx book theme and the URL should work correctly

You just reinstall jupyter-book after that change, re-build a book and it works?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suggesting Changes on GitHub | You've Been Haacked
To use it, go to the Files changed tab of a pull request. When you hover over the line you want to fix,...
Read more >
How do you suggest an edit to a repo's description in Github
The answer seems to be No, you can't. This is because the repo description isn't a part of git, it's a GitHub specific...
Read more >
Btrfs - Wikipedia
Btrfs is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager (not...
Read more >
GitHub for iOS: Edit files from Browse Code | GitHub Changelog
These pins appear above the list of discussions in that category and are not affected by pagination or search.
Read more >
google nest hub stuck on g screen
Edit : UK - would have to be rechargeable. org gives you access to C-SPAN's ... A look at Google's support forums shows...
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