From 6ce2bd6b9f0685bf5d11e24c6a012258f618ae32 Mon Sep 17 00:00:00 2001 From: Andrei Marcu Date: Thu, 14 May 2020 01:12:24 -0700 Subject: [PATCH] Display pages: Add OpenGraph tags for media --- display.go | 1 + templates/display/audio.html | 7 +++++-- templates/display/image.html | 6 +++++- templates/display/video.html | 8 ++++++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/display.go b/display.go index 6ac87d6..6228216 100644 --- a/display.go +++ b/display.go @@ -122,6 +122,7 @@ func fileDisplayHandler(c web.C, w http.ResponseWriter, r *http.Request, fileNam "forcerandom": Config.forceRandomFilename, "lines": lines, "files": metadata.ArchiveFiles, + "siteurl": strings.TrimSuffix(getSiteURL(r), "/"), }, r, w) if err != nil { diff --git a/templates/display/audio.html b/templates/display/audio.html index b5ae1e3..ba491f0 100644 --- a/templates/display/audio.html +++ b/templates/display/audio.html @@ -1,9 +1,12 @@ {% extends "base.html" %} +{% block head %} + +{% endblock %} + {% block main %} -{% endblock %} - +{% endblock %} \ No newline at end of file diff --git a/templates/display/image.html b/templates/display/image.html index 807b7ad..985c504 100644 --- a/templates/display/image.html +++ b/templates/display/image.html @@ -1,7 +1,11 @@ {% extends "base.html" %} +{% block head %} + +{% endblock %} + {% block main %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/display/video.html b/templates/display/video.html index 317664b..54a796f 100644 --- a/templates/display/video.html +++ b/templates/display/video.html @@ -1,8 +1,12 @@ {% extends "base.html" %} +{% block head %} + +{% endblock %} + {% block main %} -{% endblock %} +{% endblock %} \ No newline at end of file