diff --git a/modules/context/repo.go b/modules/context/repo.go index e4ac65e961..15c88d0b57 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -529,6 +529,11 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) { ctx.Data["RepoLink"] = ctx.Repo.RepoLink ctx.Data["RepoRelPath"] = ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name + if setting.EnableFeed { + ctx.Data["EnableFeed"] = true + ctx.Data["FeedURL"] = ctx.Repo.RepoLink + } + unit, err := ctx.Repo.Repository.GetUnit(ctx, unit_model.TypeExternalTracker) if err == nil { ctx.Data["RepoExternalIssuesLink"] = unit.ExternalTrackerConfig().ExternalTrackerURL diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 8663e11382..8669397027 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -707,9 +707,6 @@ func Home(ctx *context.Context) { feed.ShowRepoFeed(ctx, ctx.Repo.Repository, showFeedType) return } - - ctx.Data["EnableFeed"] = true - ctx.Data["FeedURL"] = ctx.Repo.Repository.Link() } checkHomeCodeViewable(ctx)