From 18cdcf8ddb8cbdc5a7c1cc8d0eb1666d9eac6d7a Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 21 Oct 2019 17:47:18 +0200 Subject: plugins: added the article Jekyll plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This plugin adds og:type related tags depending on whether the given page is a website or an article. Signed-off-by: Miquel Sabaté Solà --- _plugins/twitter.rb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to '_plugins/twitter.rb') diff --git a/_plugins/twitter.rb b/_plugins/twitter.rb index e65831b..e04eecc 100644 --- a/_plugins/twitter.rb +++ b/_plugins/twitter.rb @@ -15,9 +15,13 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +require_relative "render_helper" + module Jekyll # Render the OG image meta HTML tag for the currently rendered page. class RenderOGImageTag < Liquid::Tag + include ::Jekyll::RenderHelper + # The path to be used when the current page does not have a specific image. DEFAULT_PATH = "/images/default.png" @@ -44,17 +48,6 @@ module Jekyll def normalize(str) str.gsub(/\s/, "-").downcase end - - # Render an HTML meta tag with the given property and content - # attributes. You may optionally pass a `name` argument. When true, it will - # use "name" instead of "property". Defaults to nil. - def render_meta(property, content, name: nil) - if name - "" - else - "" - end - end end end -- cgit v1.2.3