diff --git a/modules/context/repo.go b/modules/context/repo.go index 9d45a6019a..8b4d0c1bf4 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -537,6 +537,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 2a57f8ef37..5bf961f412 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -711,9 +711,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)