summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBilel Medimegh <bilel.medimegh@gmail.com>2020-10-16 00:21:49 +0200
committerGitHub <noreply@github.com>2020-10-16 08:21:49 +1000
commitd36fb862c8f0d14bd70d702fec3c7e17ff1cf205 (patch)
tree6f93108e905e5ad4e253bf316bfb0e637e5ee3c5 /templates
parent9502e15a1c5fed0fe6271bae51a2e5a54d3d97c5 (diff)
Added opengraphs (https://ogp.me/) tags to support embedding, #24 (#25)
* Added opengraphs (https://ogp.me/) tags to support embedding, #24 * Edited AUTHORS
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html
index 1584526..1b0ab6c 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,6 +1,7 @@
{{define "base"}}
+{{ $playing := .Playing }}
<!DOCTYPE html>
-<html lang="en">
+<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -10,6 +11,18 @@
<link rel="stylesheet" type="text/css" href="/static/upload.css">
<link rel="stylesheet" type="text/css" href="/static/import.css">
+ {{if $playing.ID}}
+ <meta property="og:title" content="{{$playing.Title}}"/>
+ <meta property="og:type" content="video.other"/>
+ <meta property="og:image" content="/t/{{ $playing.ID}}"/>
+ <meta property="og:video" content="/v/{{ $playing.ID }}.mp4">
+ <meta property="og:video:url" content="/v/{{ $playing.ID }}.mp4">
+ <meta property="og:video:secure_url" content="/v/{{ $playing.ID }}.mp4">
+ <meta property="og:description" content="{{$playing.Description}}"/>
+ <meta property="og:site_name" content="Tube"/>
+ <meta property="og:url" content="/v/{{ $playing.ID }}"/>
+ {{end}}
+
{{ template "stylesheets" . }}
{{ template "css" . }}
<title>Tube</title>