Edit link has wrong label
See original GitHub issueProblem Description
I’m hosting my repo on GitLab, but the edit link says GitHub.
Steps to reproduce the behavior:
- Configure edit url:
pdoc.render.configure(
edit_url_map={
"codefs": "https://gitlab.com/dAnjou/fs-code/-/blob/main/src/codefs/",
},
)
- Generate docs
Expected behavior
Edit link says Edit on GitLab
.
Actual behavior
Edit link says Edit on GitHub
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
"Ghost links" in excel - Microsoft Community Hub
Dear all, I have a link in my excel (visible in data/edit links) but I cannot find in which cell this link exists....
Read more >Hyperref links linking to the wrong label. - TeX
In Axioms and Operations after the third exercise, I have \label{exer3}. Later in exercise 6, I reference it twice with \ref{exer3}, however, ...
Read more >Permanently Remove Update Links Alert in Microsoft Excel
Go to the 'Data' ribbon. In the 'Queries & Connections' section, select 'Edit Links' (if the 'Edit Links' button is grayed out, you're...
Read more >Hyperlink in Excel: how to create, edit and remove - Ablebits
Removing hyperlinks in Excel is a two-click process. You simply right-click a link, and select Remove Hyperlink from the context menu. Removing ...
Read more >Removing Phantom Excel Links - The Marquee Group
How to check for non-phantom links · Go to the Edit menu and select the Links option towards the bottom (if this option...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think @mrossinek already shared a good way how you can configure the label in https://github.com/mitmproxy/pdoc/issues/333#issuecomment-1013763332, and this approach will continue to work. I’ve set a relatively high bar for adding new CLI configuration switches to pdoc, my goal is to keep things simple where we can (you may be familiar with the German term Eierlegende Wollmilchsau — we try to avoid that here).
a20bee8 adds the “Edit on GitLab”/“Edit Source” wording, which should hopefully fix things for 99% of the use cases. Thank you two again for the feedback and for sharing your approaches! 😃 🍰
The “Edit on GitHub” phrasing originates from
sphinx-rtd-theme
, see for example on https://docs.readthedocs.io/en/stable/. The motivation for this button is that people can use it to propose changes to the page they are currently viewing with little effort. For example, here’s a PR where someone read the mitmproxy docs, spotted a typo, and immediately proposed a fix: https://github.com/mitmproxy/mitmproxy/pull/5062/. Having “GitHub” in the message signals to the reader that this will be a familiar and low-effort process (assuming they have a GitHub account). Long story short, I think there’s strong precedent for the “Edit [on GitHub]” wording and I would like to keep it that way.I feel that a “Browse repo” button should much rather point to the repo root and not to individual files. The full source code is also already available as part of the pdoc page. I would be happy to also accomodate GitLab users here, but we want to optimize for the common case (GitHub), where I think the “Edit on GitHub” wording is better. Of course, you can always change it with a custom template. 😃