Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Improve generated social images #19

Open
2 of 4 tasks
rhoerr opened this issue Aug 28, 2022 · 3 comments
Open
2 of 4 tasks

Improve generated social images #19

rhoerr opened this issue Aug 28, 2022 · 3 comments

Comments

@rhoerr
Copy link
Contributor

rhoerr commented Aug 28, 2022

The social images are configured at https://github.com/mage-os/mage-os-website/blob/master/src/layouts/default.astro#L13

They generate for each page by means of a background color, text, and a transparent image overlay (the Mage-OS logo).

Improvements needed:

  • Need to change or remove the default title
  • Need to fix long titles getting cut off (wrap if possible)
  • Should add description if possible
  • Could use with a prettier final social embed image; they're very plain currently

Example:

Mage-OS social image embed example

@rhoerr
Copy link
Contributor Author

rhoerr commented Sep 19, 2022

Investigated, not great news on the text wrapping/getting cut off.

The social image generation library docs are at https://github.com/Princesseuh/astro-social-images/blob/main/Docs.md.

This uses an SVG process to turn the config and page info into the social image. Trouble is SVG doesn't inherently support text wrapping. There's an issue on astro-social-images with some discussion of possible solutions, but until somebody contributes a fix, this is what we've got.

That said, I've adjusted the font size and positioning a bit to help. We should try to keep page and post titles down to minimize the overflow. With the serif font my local images generated with, we get about 45 characters on the title. Should be ~2x that for the description.

I fixed the default title in the process.

I'm not a designer, so making it prettier in general will need someone else's help. Maybe I'll revisit in the future. Could add a white bar at the bottom for the logo maybe. It's a little tricky and limited because another limitation of the library is the image is applied as an overlay on top of the text--not a background. That means anywhere there's image, there can't be title or description.

@rhoerr
Copy link
Contributor Author

rhoerr commented Sep 20, 2022

Outstanding:

  • Could use with a prettier final social embed image; they're very plain currently

@rhoerr
Copy link
Contributor Author

rhoerr commented Dec 2, 2022

This may not be worth further action at the moment. We're planning to merge this into the informational site for Mage-OS that's underway, at which point this may not be relevant anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant