-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate social images #1725
base: main
Are you sure you want to change the base?
Generate social images #1725
Conversation
gastaldi
commented
Jun 14, 2023
•
edited
Loading
edited
- Fixes Customize the preview image for guides #1723
02613ce
to
112a096
Compare
Marking as a draft since the images generated in |
yeah jekyll needs to know about the images - you can't just dump them into directories that comes from direct copies. I had this issue in the past - trying to recall what was the fix... |
so yeah, now i recall - you need to have it be a full plugin OR commit them to the actual repo. Did you try see if https://github.com/boyvanamstel/jekyll-gensocial might just work? |
actually gen-scoial could be useful for the blog style content. maybe https://github.com/jekyll/jekyll-seo-tag in combination would be good? for ascidoc might just steal the approach of gen-social to generate into the source dir that could be in a git ignored folder? |
I've given https://github.com/boyvanamstel/jekyll-gensocial a try and here are my impressions: Pros
Cons
In case you're curious, I've pushed a working configuration in https://github.com/gastaldi/quarkusio.github.io/tree/jekyll_gensocial |
@gastaldi what's the status of this? |
It works, but the generated files' sizes surpass the maximum allowed upload size in surge.sh |
This might help: https://github.com/marketplace/actions/imagemagick-action. I've used ImageMagick in the past to resize images. In that case they were pictures of fish I was batch-processing, but the principle would be similar. ... or we could do the equivalent in code, maybe with this: https://github.com/rmagick/rmagick. That would have the advantage of being the same locally and in GitHub ... and the disadvantage that ImageMagick has some native components, so the install might be a bit fiddly. Or it might not be - I haven't tried it via a gem. |
55937fa
to
e213e26
Compare
@gsmet according to your suggestion, I added a config that skips the social image generation during preview and it seems to work. |
boy this is slow locally ...how long does it take you to build? |
The first build is slow indeed. The subsequent ones are faster |
I run this locally and it generates social images but I only see "quarkus_card.png" in og:image of blogs is that expected? |
Yes, because I am only generating social images for guides. See https://github.com/quarkusio/quarkusio.github.io/pull/1725/files#diff-41b71bd8e56b7f1670ccca46cbf0dec0b906a961b0a9c140914425009ecc879aR36 and https://github.com/quarkusio/quarkusio.github.io/pull/1725/files#diff-41b71bd8e56b7f1670ccca46cbf0dec0b906a961b0a9c140914425009ecc879aR11 |
mkay - but aren't the blog posts the most shared ones for social images? why only guides? |
So far I have only shared guides in my chat messaging apps (which is why I made this change). That may work, need to improve the script to read from the blog directory too. |
@gastaldi fun - i rarely share guides - its more blog posts :) |
6d6dc61
to
11e8f9a
Compare
- Fixes #1723 Allow skipping social image generation Also generate social image for blog posts
11e8f9a
to
0ff6d90
Compare