|
|
|
@ -37,19 +37,25 @@
|
|
|
|
|
{{if .Owner.Description}}
|
|
|
|
|
<meta property="og:description" content="{{.Owner.Description}}">
|
|
|
|
|
{{end}}
|
|
|
|
|
{{else if .PageIsViewCode }}
|
|
|
|
|
<meta name="twitter:image:src" content="{{.OgImage}}">
|
|
|
|
|
{{else if and .PageIsViewCode .HideRepoInfo }}
|
|
|
|
|
<meta name="twitter:site" content="@gitea">
|
|
|
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
|
|
|
<meta name="twitter:title" content="{{.Repository.Name}}/{{.FileName}}">
|
|
|
|
|
<meta name="twitter:description" content="{{.Repository.Description}}">
|
|
|
|
|
<meta property="og:image" content="{{.OgImage}}">
|
|
|
|
|
<meta property="og:image:alt" content="{{.Repository.Description}}">
|
|
|
|
|
<meta name="twitter:title" content="{{.Repository.Name}}/{{.FileName}}">
|
|
|
|
|
<meta property="og:site_name" content="{{AppName}}">
|
|
|
|
|
<meta property="og:type" content="object">
|
|
|
|
|
<meta property="og:title" content="{{.Repository.Name}}/{{.FileName}}">
|
|
|
|
|
<meta property="og:url" content="{{.Repository.HTMLURL}}">
|
|
|
|
|
<meta property="og:description" content="{{.Repository.Description}}">
|
|
|
|
|
{{ if .OgImage }}
|
|
|
|
|
<meta property="og:description" content="{{.Repository.Description}}">
|
|
|
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
|
|
|
<meta name="twitter:image:src" content="{{.OgImage}}">
|
|
|
|
|
<meta property="og:image" content="{{.OgImage}}">
|
|
|
|
|
<meta property="og:image:alt" content="{{.Repository.Description}}">
|
|
|
|
|
{{ else if (.Repository.AvatarLink $.Context)}}
|
|
|
|
|
<meta property="og:image" content="{{.Repository.AvatarLink $.Context}}">
|
|
|
|
|
{{else}}
|
|
|
|
|
<meta property="og:image" content="{{.Repository.Owner.AvatarLink $.Context}}">
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{else if .Repository}}
|
|
|
|
|
{{if .Issue}}
|
|
|
|
|
<meta property="og:title" content="{{.Issue.Title}}">
|
|
|
|
@ -58,7 +64,7 @@
|
|
|
|
|
<meta property="og:description" content="{{.Issue.Content}}">
|
|
|
|
|
{{end}}
|
|
|
|
|
{{else}}
|
|
|
|
|
<meta property="og:title" content="{{.Repository.Name}}">
|
|
|
|
|
<meta property="og:title" content="{{.Repository.Owner.Name}}/{{.Repository.Name}}">
|
|
|
|
|
<meta property="og:url" content="{{.Repository.HTMLURL}}">
|
|
|
|
|
{{if .Repository.Description}}
|
|
|
|
|
<meta property="og:description" content="{{.Repository.Description}}">
|
|
|
|
|