aboutsummaryrefslogtreecommitdiff
path: root/juick-www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-08-24 15:24:13 +0300
committerGravatar Vitaly Takmazov2017-08-24 15:24:13 +0300
commit32181c51f9bb2c6b4a49f08f84c6b43069174ba2 (patch)
tree4c7d3e3e4b29aeeeb73ccc23df4297bf908425db /juick-www
parentd55d40cf085ffc8e08cf5a2fc3495b3837375490 (diff)
www: og:type
Diffstat (limited to 'juick-www')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/UserThread.java4
-rw-r--r--juick-www/src/main/webapp/WEB-INF/layouts/content.html1
2 files changed, 4 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java
index 5a1bac97..a93dc780 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java
@@ -108,7 +108,9 @@ public class UserThread {
headers += "<meta name=\"robots\" content=\"noindex\"/>";
}
String cardType = StringUtils.isNotEmpty(msg.getAttachmentType()) ? "summary_large_image" : "summary";
- String msgImage = StringUtils.isNotEmpty(msg.getAttachmentType()) ? msg.getPhotoURLs().getMedium() : "//i.juick.com/a/" + msg.getUser().getUid() + ".png";
+ String msgImage = StringUtils.isNotEmpty(msg.getAttachmentType()) ? msg.getPhotoURLs().getMedium()
+ : "//i.juick.com/a/" + msg.getUser().getUid() + ".png";
+ model.addAttribute("ogtype", "article");
String cardDescription = StringEscapeUtils.escapeHtml4(PlainTextFormatter.formatTwitterCard(msg));
headers += "<meta name=\"twitter:card\" content=\"" + cardType + "\" />\n" +
"<meta name=\"twitter:site\" content=\"@juick\" />\n" +
diff --git a/juick-www/src/main/webapp/WEB-INF/layouts/content.html b/juick-www/src/main/webapp/WEB-INF/layouts/content.html
index 343fb3be..b0ca553f 100644
--- a/juick-www/src/main/webapp/WEB-INF/layouts/content.html
+++ b/juick-www/src/main/webapp/WEB-INF/layouts/content.html
@@ -9,6 +9,7 @@
{{ headers | default('') | raw }}
{% endblock %}
<title>{{ title | default('Juick') }}</title>
+ <meta property="og:type" content="{{ ogtype | default('website') }}" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="msapplication-config" content="//i.juick.com/browserconfig.xml"/>
<meta name="msapplication-TileColor" content="#ffffff"/>