summaryrefslogtreecommitdiffstats
path: root/routers/repo/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r--routers/repo/view.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index c7ed649518..65ca677867 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -30,7 +30,11 @@ const (
)
func Home(ctx *context.Context) {
- ctx.Data["Title"] = ctx.Repo.Repository.Owner.Name + "/" + ctx.Repo.Repository.Name + ": " + ctx.Repo.Repository.Description
+ title := ctx.Repo.Repository.Owner.Name + "/" + ctx.Repo.Repository.Name
+ if len(ctx.Repo.Repository.Description) > 0 {
+ title += ": " + ctx.Repo.Repository.Description
+ }
+ ctx.Data["Title"] = title
ctx.Data["PageIsViewCode"] = true
ctx.Data["RequireHighlightJS"] = true