summaryrefslogtreecommitdiff
path: root/templates/thread.html
diff options
context:
space:
mode:
author8chan <admin@8chan.co>2015-02-16 16:31:15 -0800
committerczaks <marcin@6irc.net>2016-05-06 12:18:31 +0200
commitce62673a2cf1dd4667b75756c80c44cc5746a63b (patch)
treeef510f220b7f0571dfa878d156fa40f25eba41c1 /templates/thread.html
parentaa0d3395b181671907800cd7110c00e35d8a8a13 (diff)
OpenGraph information in thread pages https://en.wikipedia.org/wiki/Facebook_Platform#Open_Graph_protocol
Diffstat (limited to 'templates/thread.html')
-rw-r--r--templates/thread.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/templates/thread.html b/templates/thread.html
index 335cd610..9051d8e0 100644
--- a/templates/thread.html
+++ b/templates/thread.html
@@ -10,7 +10,18 @@
</script>
{% include 'header.html' %}
- <title>{{ board.url }} - {% if config.thread_subject_in_title and thread.subject %}{{ thread.subject }}{% else %}{{ thread.body_nomarkup[:256]|e }}{% endif %}</title>
+
+ {% set meta_subject %}{% if config.thread_subject_in_title and thread.subject %}{{ thread.subject|e }}{% else %}{{ thread.body_nomarkup[:256]|e }}{% endif %}{% endset %}
+
+ <meta name="description" content="8chan /{{ board.uri }}/ - {{ board.title|e }} - {{ meta_subject }}" />
+ <meta name="twitter:card" value="summary">
+ <meta property="og:title" content="{{ meta_subject }}" />
+ <meta property="og:type" content="article" />
+ <meta property="og:url" content="https://8ch.net/{{ board.uri }}/{{ config.dir.res }}{{ thread.id }}.html" />
+ {% if thread.files.0.thumb %}<meta property="og:image" content="https://8ch.net/{{ board.uri }}/{{ config.dir.thumb }}{{ thread.files.0.thumb }}" />{% endif %}
+ <meta property="og:description" content="{{ thread.body_nomarkup|e }}" />
+
+ <title>{{ board.url }} - {{ meta_subject }}</title>
</head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }}