Open whmmm opened 4 years ago
This issue should not be fixed with an extra field on themeConfig
because it makes the users configuration more complex.
We had the same problem with bitbucket, here is how we fixed this. It should be the same process for gitea 😉
@kefranabg
Gitea's edit link is basiclly the same as source but with an extra _
before edit
For example:
Edit link generate by default theme for source:
https://random.gitea.com/User/Repo/edit/branch/folder/README.md
The true edit link gitea use:
https://radom.gitea.com/User/Repo/_edit/branch/folder/README.md
Maybe you could just add an extra setting options to add that extra _
@kefranabg how do I update override existing methods to adapt it do Gitea?
@kefranabg
The problem with the current solution is that it only works for the 'online' versions of said services.
I have a self hosted gitea instance. Just checking for gitea.com
would not help since a self hosted instance doesn't contain it. The same applies for GitLab.
My idea would be an optional field in themeConfig
like repoProvider
or something that takes values like github
, gitlab
, gitea
etc. That could default to github
or nothing so the current detection could step in if the provider is not explicitly specified.
With that most people would be fine without any additional config and people who need it can just set one more field wich is not too much I think.
@hendrikbl You bring up an excellent point. I think the tricky part will be figuring out the various use cases for the escape hatch when users want to do something custom.
For example, some of them may have different pre-pended strings, but some may need to add something at the end of the URL.
Any news on this?
Any updates?
Feature request
What problem does this feature solve?
git editLinks
is not correct on the gitea !What does the proposed API look like?
How should this be implemented in your opinion?
Add a paramter in
themeConfig
Are you willing to work on this yourself?
Yes,It's not a difficult question.