From 6d6dc6115ca5fc89ec8d93f19f20f4bd1697a932 Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Wed, 1 Nov 2023 14:26:57 -0300 Subject: [PATCH] fixup! Also generate social image for blog posts --- _plugins/social_images.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_plugins/social_images.rb b/_plugins/social_images.rb index 828380aa60e..a2ae5be2172 100644 --- a/_plugins/social_images.rb +++ b/_plugins/social_images.rb @@ -8,8 +8,7 @@ module SocialImages def social_image(text, page_path) # If text is not empty, return it if text.nil? || text.empty? - # If page_path contains "guides/", return the social image path - if page_path.include?('guides/') + if File.exist?("./assets/images/social/#{File.basename(page_path, '.adoc')}.png") return "/assets/images/social/#{File.basename(page_path, '.adoc')}.png" else return "/assets/images/quarkus_card.png"