forked from forgejo/forgejo
Make URL scheme unambiguous (#2408)
* Make URL scheme unambiguous Redirect old routes to new routes * Fix redirects to new URL scheme, and update template * Fix branches/_new endpoints, and update integration test
This commit is contained in:
parent
6e98812ecf
commit
513375c429
20 changed files with 279 additions and 144 deletions
|
@ -297,9 +297,9 @@ func renderCode(ctx *context.Context) {
|
|||
ctx.Data["Title"] = title
|
||||
ctx.Data["RequireHighlightJS"] = true
|
||||
|
||||
branchLink := ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchName
|
||||
branchLink := ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
|
||||
treeLink := branchLink
|
||||
rawLink := ctx.Repo.RepoLink + "/raw/" + ctx.Repo.BranchName
|
||||
rawLink := ctx.Repo.RepoLink + "/raw/" + ctx.Repo.BranchNameSubURL()
|
||||
|
||||
if len(ctx.Repo.TreePath) > 0 {
|
||||
treeLink += "/" + ctx.Repo.TreePath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue