From a120fb2977331e0f7d7ffe05861ba179fdae8764 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 13 Aug 2018 10:42:27 +0200 Subject: Add OpenGraph meta tags on permalink page Includes: - og:title - og:type -> article - og:image -> if there is a thumbnail - og:url -> permalink - og:description -> first 300 chars of raw description - article:published_time - article:modified_time - article:tag -> one OG meta tag for each shaare tag Fixes #258 --- tpl/vintage/includes.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tpl/vintage') diff --git a/tpl/vintage/includes.html b/tpl/vintage/includes.html index 410b466b..df093495 100644 --- a/tpl/vintage/includes.html +++ b/tpl/vintage/includes.html @@ -12,3 +12,23 @@ {/loop} {if="is_file('data/user.css')"}{/if} +{if="! empty($links) && count($links) === 1"} + {$link=reset($links)} + + + + {$ogDescription=isset($link.description_src) ? $link.description_src : $link.description} + + {if="$link.thumbnail"} + + {/if} + {if="!$hide_timestamps || $is_logged_in"} + + {if="$link.updated"} + + {/if} + {/if} + {loop="link.taglist"} + + {/loop} +{/if} -- cgit v1.2.3 From 8c75c43e7ee0370eefceea84c6a74383e5c65d4b Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 14 Aug 2018 11:43:54 +0200 Subject: Fix a bug making thumbnail to request the current page --- tpl/vintage/daily.html | 2 +- tpl/vintage/linklist.html | 2 +- tpl/vintage/picwall.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tpl/vintage') diff --git a/tpl/vintage/daily.html b/tpl/vintage/daily.html index 00148a58..71d84475 100644 --- a/tpl/vintage/daily.html +++ b/tpl/vintage/daily.html @@ -71,7 +71,7 @@ {if="$thumbnails_enabled && !empty($link.thumbnail)"}
thumbnail
{/if} diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html index 3f202849..dcb14e90 100644 --- a/tpl/vintage/linklist.html +++ b/tpl/vintage/linklist.html @@ -85,7 +85,7 @@ {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} thumbnail diff --git a/tpl/vintage/picwall.html b/tpl/vintage/picwall.html index 5f1d266e..b3a16791 100644 --- a/tpl/vintage/picwall.html +++ b/tpl/vintage/picwall.html @@ -17,7 +17,7 @@
{ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} thumbnail {$value.title} {loop="$value.picwall_plugin"} -- cgit v1.2.3