Skip to content

Commit

Permalink
fixup! Also generate social image for blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Nov 1, 2023
1 parent 05ee114 commit 6d6dc61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _plugins/social_images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6d6dc61

Please sign in to comment.