Skip to content
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

Develop Twitter card representations for records #182

Closed
ahankinson opened this issue May 5, 2022 · 3 comments
Closed

Develop Twitter card representations for records #182

ahankinson opened this issue May 5, 2022 · 3 comments
Assignees
Labels
Audience: General public Issues that affect our wider community Component: User Interface Issues that deal with the UI Type: Enhancement New features or improvements
Milestone

Comments

@ahankinson
Copy link
Contributor

When a user links to a result on Twitter, we should have a nice "Twitter card" representation to embed.

See:

https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup

Tagging @jenniferward to see if she has any feedback or suggestions on this issue.

@ahankinson ahankinson added Audience: General public Issues that affect our wider community Priority: Moderate Type: Enhancement New features or improvements Component: User Interface Issues that deal with the UI labels May 5, 2022
@ahankinson ahankinson added this to the Public Beta milestone May 5, 2022
@ahankinson ahankinson self-assigned this May 5, 2022
@ahankinson ahankinson modified the milestones: Public Beta, Launch May 5, 2022
@jenniferward
Copy link
Collaborator

@lpugin did this for the website and the News image shows up as a preview. I am happy with how it works. See also https://cards-dev.twitter.com/validator . Maybe it can pick up IIIF images, if any, as a preview? Or some sort of default image.

Also consider how Facebook takes up links. We have this issue rism-digital/rism.info#19 but sometimes Facebook picks up the news image, sometimes it doesn't, sometimes it just shows the logo.

@ahankinson
Copy link
Contributor Author

Ideas:

  • Doesn't seem to be possible to generate TCs dynamically on the source page. So a separate server should be written to handle requests specifically from Twitterbot.
    • separate server could also handle other "data export" tasks (export to csv, e-mail copy, etc.)
  • Create template for sources. Would need to match the routes we have already for the records. Deliver a very simple HTML response with the meta tags for the card.
  • For the card image: Create an SVG template (jinja2); load data from Solr; convert SVG to PNG on-the-fly
    • If there is an incipit, maybe embed this
    • If there is a IIIF manifest attached, maybe get the first image from that (or the thumbnail block)

Questions:

  • Would need to test and see if the same approach could be used for Facebook (or other OpenGraph consumers).

ahankinson added a commit to rism-digital/muscatplus_server that referenced this issue May 12, 2022
This is an initial implementation of OpenGraph responses for Twitter and Facebook.

Not complete, but is minimally viable and can be refined later.

Also refines the sitemaps functionality.

Refs rism-digital/rism-online-issues#182
Refs rism-digital/rism-online-issues#180
@ahankinson
Copy link
Contributor Author

We have an initial implementation of this. It's not perfect, but can be refined with feedback (and more time!) Adjustments can be described in separate issues, so I will close this now.

ahankinson added a commit to rism-digital/muscatplus_indexer that referenced this issue Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Audience: General public Issues that affect our wider community Component: User Interface Issues that deal with the UI Type: Enhancement New features or improvements
Projects
None yet
Development

No branches or pull requests

2 participants