Sharing: Set siteUrl to shared content #18
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
957638e0df
commit
c07f657c06
4 changed files with 6 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
<title>{{ .config.SiteTitle }}</title>
|
||||
|
||||
<meta property="og:url" content="{{ .config.SiteUrl }}"/>
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ .config.SiteTitle }}{{if .config.SiteCaption}}: {{ .config.SiteCaption }}{{end}}"/>
|
||||
<meta property="og:image" content="{{ .config.SitePreview }}"/>
|
||||
<meta property="og:description" content="{{ .config.SiteDescription }}"/>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<title>{{ .config.SiteTitle }}{{if .config.SiteCaption}}: {{ .config.SiteCaption }}{{end}}</title>
|
||||
|
||||
<meta property="og:url" content="{{ .config.SiteUrl }}"/>
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ .config.SiteCaption }}"/>
|
||||
<meta property="og:image" content="{{ .config.SitePreview }}"/>
|
||||
<meta property="og:description" content="{{ .config.SiteDescription }}"/>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<title>{{ .config.SiteTitle }}</title>
|
||||
|
||||
<meta property="og:url" content="{{ .config.SiteUrl }}"/>
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ .config.SiteTitle }}{{if .config.SiteCaption}}: {{ .config.SiteCaption }}{{end}}"/>
|
||||
<meta property="og:image" content="{{ .config.SitePreview }}"/>
|
||||
<meta property="og:description" content="{{ .config.SiteDescription }}"/>
|
||||
|
|
|
@ -26,6 +26,7 @@ func Shares(router *gin.RouterGroup) {
|
|||
}
|
||||
|
||||
clientConfig := conf.GuestConfig()
|
||||
clientConfig.SiteUrl = fmt.Sprintf("%ss/%s", clientConfig.SiteUrl, shareToken)
|
||||
|
||||
c.HTML(http.StatusOK, "share.tmpl", gin.H{"config": clientConfig})
|
||||
})
|
||||
|
@ -52,7 +53,8 @@ func Shares(router *gin.RouterGroup) {
|
|||
}
|
||||
|
||||
clientConfig := conf.GuestConfig()
|
||||
clientConfig.SitePreview = fmt.Sprintf("%ss/%s/%s/preview", clientConfig.SiteUrl, shareToken, uid)
|
||||
clientConfig.SiteUrl = fmt.Sprintf("%ss/%s/%s", clientConfig.SiteUrl, shareToken, uid)
|
||||
clientConfig.SitePreview = fmt.Sprintf("%s/preview", clientConfig.SiteUrl)
|
||||
|
||||
if a, err := query.AlbumByUID(uid); err == nil {
|
||||
clientConfig.SiteCaption = a.AlbumTitle
|
||||
|
|
Loading…
Reference in a new issue