diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 760e33a0f..ca9c75a49 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -523,6 +523,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
@@ -1046,11 +1047,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 beb5ece56..2e4de59df 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -36,19 +36,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}}
@@ -57,7 +63,7 @@
{{end}}
{{else}}
-
+
{{if .Repository.Description}}