summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
authorErik Michelson2019-10-04 19:49:45 +0200
committerErik Michelson2019-10-04 19:49:45 +0200
commit2881f8211aaaa2def3f3cedabf635f03733ac82e (patch)
tree4fb907585270cd710a7dcea0e1be01f2eb46fb87 /public/views
parent116bd7230c91e76e1d94e8878bef6487cbcc00ea (diff)
Added customizable og-metadata to notes
Signed-off-by: Erik Michelson <erik@liltv.de>
Diffstat (limited to 'public/views')
-rw-r--r--public/views/codimd/head.ejs4
-rw-r--r--public/views/pretty.ejs4
2 files changed, 8 insertions, 0 deletions
diff --git a/public/views/codimd/head.ejs b/public/views/codimd/head.ejs
index e3edde66..e2f0375c 100644
--- a/public/views/codimd/head.ejs
+++ b/public/views/codimd/head.ejs
@@ -4,6 +4,10 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
+<% for (var og in opengraph) { %>
+<% if (opengraph.hasOwnProperty(og) && opengraph[og].trim() !== '') { %>
+<meta property="og:<%= og %>" content="<%= opengraph[og] %>">
+<% }} %>
<title><%= title %></title>
<link rel="icon" type="image/png" href="<%- serverURL %>/favicon.png">
<link rel="apple-touch-icon" href="<%- serverURL %>/apple-touch-icon.png">
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
index 1970ab2f..5f18ea8b 100644
--- a/public/views/pretty.ejs
+++ b/public/views/pretty.ejs
@@ -14,6 +14,10 @@
<% if(typeof description !== 'undefined' && description) { %>
<meta name="description" content="<%= description %>">
<% } %>
+ <% for (var og in opengraph) { %>
+ <% if (opengraph.hasOwnProperty(og) && opengraph[og].trim() !== '') { %>
+ <meta property="og:<%= og %>" content="<%= opengraph[og] %>">
+ <% }} %>
<title><%= title %></title>
<link rel="icon" type="image/png" href="<%- serverURL %>/favicon.png">
<link rel="apple-touch-icon" href="<%- serverURL %>/apple-touch-icon.png">