diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 997b00bb5..6bf6fbafa 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -532,6 +532,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
if len(ctx.Repo.TreePath) > 0 {
ogImg += "/" + util.PathEscapeSegments(ctx.Repo.TreePath)
}
+
ctx.Data["OgImage"] = ogImg
ctx.Data["EscapeStatus"] = status
ctx.Data["FileContent"] = fileContent
@@ -1055,11 +1056,6 @@ func renderCode(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplRepoHome)
}
-func HighlightCodeToImage() error {
-
- return nil
-}
-
// RenderUserCards render a page show users according the input template
func RenderUserCards(ctx *context.Context, total int, getter func(opts db.ListOptions) ([]*user_model.User, error), tpl base.TplName) {
page := ctx.FormInt("page")
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 1c5f2db44..46749da52 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -33,19 +33,25 @@
{{if .ContextUser.Description}}
{{end}}
-{{else if .PageIsViewCode }}
-
+{{else if and .PageIsViewCode .HideRepoInfo }}
-
-
-
-
+
-
+ {{ if .OgImage }}
+
+
+
+
+
+ {{ else if (.Repository.AvatarLink $.Context)}}
+
+ {{else}}
+
+ {{ end }}
{{else if .Repository}}
{{if .Issue}}
@@ -54,7 +60,7 @@
{{end}}
{{else}}
-
+
{{if .Repository.Description}}