-
Notifications
You must be signed in to change notification settings - Fork 337
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
More control over Opengraph/twitter card #936
Comments
This should be straightforward via params in template:
opengraph:
img: path/to/img Change: Line 97 in 11facef
to, e.g. (need to handle the fig path): og$image <- pkg$meta$opengraph$img %||% paste0(site_url, "logo.png") |
@jayhesselberth Interested in a PR at least for the global option? Regarding the page-specific images, can one add such an argument to the vignette YAML header? And then tweak the code somewhere near Line 180 in 04e3f6e
@thomasp85 what would you use as an image for |
I’d use a padded version over white background |
So would a function producing that version, and saving it at the right location (maybe man/figures/og-logo.png), make any sense anywhere? Then
|
My dream scenario would be that pkgdown did the padding automatically - the requirements for OpenGraph is so different from what is expected from logo.png, that it will only be by chance that it can be used unmodified in OpenGraph... But in the lack of such automation I'd like what you propose... |
From what I've seen in the history of this repo the dependency on @jayhesselberth & others in charge, are you interested in a PR such that
And maybe a different PR after that to try and make it possible to set per page for articles? And regarding a helper function that'd pad logo.png+add a white background (using |
The automatic generation of og/twitter card metadata is nice, but it would be great to be able to supply alternative default (and potentially page specific) pictures. The use of logo.png is suboptimal, as this file is best tightly cropped and with a transparent background when used in docs and readme, but this leads to poor look on twitter, where the optimal is a square, slightly padded image with white background.
An example of current look:
The text was updated successfully, but these errors were encountered: