Closed amiram closed 6 years ago
Hi @amiram , sounds like you were able to solve this issue by further adjusting the source git URL, is that right?
Yes, but a note can be added to make it clear to the user or even better to fix it in code. I tried to find how to do it but didn't. If you instruct me where to fix it I can open a PR for that.
All three Git Sync themes have a Twig file to handle URL calc/display, which can be found in the folder user/themes/THEMENAME/templates/partials/gitrepo_link.html.twig
Your use case might be unique, so perhaps handling it by using a custom Git Sync URL in site config vs. adding a special case might be the best way to handle it? For sure I could also add a note in the readme for the theme as well, thanks.
Pardon me but I'm new to grav. I found the folder in my grav instance, but not in your repo.
No problem, which Git Sync theme of mine are you using?
learn-2
Learn 2, not Learn2 with Git Sync? Oh, if that is the case this is the repo: https://github.com/getgrav/grav-theme-learn2
My Learn2 with Git Sync theme contains a lot of auto-calculation stuff for URLs https://github.com/hibbitts-design/grav-theme-learn2-git-sync so please make sure you've got the right theme🙂
Oh I got it now. I'm using learn2 with git sync. I'll find it there. Thanks
Great! FYI, in the Learn2 with Git Sync Theme settings you can modify the base Edit this Page in Git URL
If you want to pursue this, perhaps close this issue here and open a new one in my repo? https://github.com/hibbitts-design/grav-theme-learn2-git-sync Thanks.
Steps to reproduce:
Set the git remote url to "others" with the repo url without a slash at the end. e.g. http://tfs-host.com/tfs/MyCollection/MyProject/_git/wiki
Open a page and click on the "Edit this Page" link.
Expected result: Link should be http://tfs-host.com/tfs/MyCollection/MyProject/_git/wiki/blob/master/pages
Actual Result: Link is http://tfs-host.com/tfs/MyCollection/MyProject/_git/wikiblob/master/pages
Workaround: Add a slash in the repo url http://tfs-host.com/tfs/MyCollection/MyProject/_git/wiki/
BTW, it is not happening with github.