Configure OpenGraph metatags #177

Closed
opened 2019-01-18 22:48:33 +00:00 by cedewey · 24 comments
cedewey commented 2019-01-18 22:48:33 +00:00 (Migrated from gitlab.com)

Background

Despite the fact that it's technically possible for Facebook and Twitter to properly pull from basic metatags they undermine open protocols by insisting on using OpenGraph. This is an issue to appease the social media giants and give them OpenGraph metadata. 😠

Work Required

  • Enable OpenGraph Metatag module
  • Configure sensible defaults
    • Remove [node:summary] default value from description metatags
    • Remove [site:name] from title metatag (it makes our page titles too long)
    • Update image metatag default value to [node:field_image:entity:url]
## Background Despite the fact that it's technically possible for Facebook and Twitter to properly pull from basic metatags they undermine open protocols by insisting on using OpenGraph. This is an issue to appease the social media giants and give them OpenGraph metadata. :angry: ## Work Required * [x] Enable OpenGraph Metatag module * [x] Configure sensible defaults * [x] Remove [node:summary] default value from description metatags * [x] Remove [site:name] from title metatag (it makes our page titles too long) * [x] Update image metatag default value to [node:field_image:entity:url]
cedewey commented 2019-01-18 22:48:33 +00:00 (Migrated from gitlab.com)

changed milestone to %8

changed milestone to %8
cedewey commented 2019-01-18 22:57:02 +00:00 (Migrated from gitlab.com)

mentioned in merge request !52

mentioned in merge request !52
cedewey commented 2019-02-01 17:54:39 +00:00 (Migrated from gitlab.com)

assigned to @mlncn and unassigned @cedewey

assigned to @mlncn and unassigned @cedewey
mlncn commented 2019-02-01 18:46:25 +00:00 (Migrated from gitlab.com)

closed via merge request !52

closed via merge request !52
mlncn commented 2019-02-01 18:46:25 +00:00 (Migrated from gitlab.com)

mentioned in commit a441a260ae

mentioned in commit a441a260ae19f13eba25608f8e6f38a210ecdf62
cedewey commented 2019-02-01 22:16:06 +00:00 (Migrated from gitlab.com)

reopened

reopened
cedewey commented 2019-02-01 22:16:46 +00:00 (Migrated from gitlab.com)

@mlncn this should stay open until it's deployed. Can you deploy it or assign it to someone who can? Thanks!

@mlncn this should stay open until it's deployed. Can you deploy it or assign it to someone who can? Thanks!
mlncn commented 2019-02-07 14:30:56 +00:00 (Migrated from gitlab.com)

@cedewey this is deployed and doing what you expect? I know Twitter has a tool for testing what pages look like to it; does Facebook have a similar tool— could you add them to this issue?

@cedewey this is deployed and doing what you expect? I know Twitter has a tool for testing what pages look like to it; does Facebook have a similar tool— could you add them to this issue?
mlncn commented 2019-02-07 14:31:08 +00:00 (Migrated from gitlab.com)

assigned to @cedewey and unassigned @mlncn

assigned to @cedewey and unassigned @mlncn
cedewey commented 2019-02-07 16:51:45 +00:00 (Migrated from gitlab.com)

marked the checklist item Enable OpenGraph Metatag module as completed

marked the checklist item **Enable OpenGraph Metatag module** as completed
cedewey commented 2019-02-07 16:54:50 +00:00 (Migrated from gitlab.com)

@mlncn not entirely. There are two bugs in the Metatag module.

  1. The node summary token doesn't work on content types using its own custom field for the body. https://www.drupal.org/project/metatag/issues/2885825
  2. Token for image field no longer works https://www.drupal.org/project/metatag/issues/2994433
    However, this token does work [node:field_image:entity:url]
@mlncn not entirely. There are two bugs in the Metatag module. 1. The node summary token doesn't work on content types using its own custom field for the body. https://www.drupal.org/project/metatag/issues/2885825 2. Token for image field no longer works https://www.drupal.org/project/metatag/issues/2994433 However, this token does work [node:field_image:entity:url]
cedewey commented 2019-02-07 16:56:09 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
cedewey commented 2019-02-18 22:19:57 +00:00 (Migrated from gitlab.com)

mentioned in merge request !62

mentioned in merge request !62
mlncn commented 2019-02-20 14:12:07 +00:00 (Migrated from gitlab.com)

closed via commit 3b7a8b7ff1

closed via commit 3b7a8b7ff1743273ad4227aab71a45fde9ae636b
mlncn commented 2019-02-20 14:12:07 +00:00 (Migrated from gitlab.com)

closed via merge request !62

closed via merge request !62
mlncn commented 2019-02-20 21:05:57 +00:00 (Migrated from gitlab.com)

mentioned in commit 3b7a8b7ff1

mentioned in commit 3b7a8b7ff1743273ad4227aab71a45fde9ae636b
mlncn commented 2019-02-21 17:14:05 +00:00 (Migrated from gitlab.com)

This is at least somewhat working on twitter!

screenshot-twitter-agaric-card-2019-02-21

Should we be getting the summary not just the title in there? And/or maybe author names?

This is at least somewhat working on twitter! ![screenshot-twitter-agaric-card-2019-02-21](/uploads/667bdc9f9bed7df22208fe4d24200838/screenshot-twitter-agaric-card-2019-02-21.png) Should we be getting the summary not just the title in there? And/or maybe author names?
cedewey commented 2019-02-21 18:24:03 +00:00 (Migrated from gitlab.com)

@mlncn summary is busted since we're not using the default body field. There's an open issue for this. So for now we need to put in our summary text manually. I did set the site's twitter account as @agaric, but the individual twitter account needs to be filled in manually per each post since authors vary.

It's also worth considering setting up image styles that crop and scale images to match what Twitter wants.

@mlncn summary is busted since we're not using the default body field. There's an open issue for this. So for now we need to put in our summary text manually. I did set the site's twitter account as @agaric, but the individual twitter account needs to be filled in manually per each post since authors vary. It's also worth considering setting up image styles that crop and scale images to match what Twitter wants.
mlncn commented 2019-02-22 06:20:06 +00:00 (Migrated from gitlab.com)

@cedewey I meant aspirationally as far as what we wanted in there, but we wouldn't want to use the summary token but the token for our description anyway, not so long as we have an explicit summary field.

So i'm giving [node:field_summary] a try.

I was wondering about just putting normal text human names in addition to the summary, i wasn't thinking about twitter handles.

What does setting the site's twitter account do? Ah ok it says it will be added to the bottom of the card. It was not set that i could see but i set it now. There's a separate 'creator' twitter account but that's not so important.

Note that setting up the image style isn't enough — it would just give the same cropping Twitter does — we need to give the editor ability to set the crop or at least the focus for that style, too.

And finally i had meant to reopen this issue when i commented before but actually i think we're done here. Sweet.

@cedewey I meant aspirationally as far as what we wanted in there, but we wouldn't want to use the summary token but the token for our description anyway, not so long as we have an explicit summary field. So i'm giving `[node:field_summary]` a try. I was wondering about just putting normal text human names in addition to the summary, i wasn't thinking about twitter handles. What does setting the site's twitter account do? Ah ok it says it will be added to the bottom of the card. It was not set that i could see but i set it now. There's a separate 'creator' twitter account but that's not so important. Note that setting up the image style isn't enough — it would just give the same cropping Twitter does — we need to give the editor ability to set the crop or at least the focus for that style, too. And finally i had meant to reopen this issue when i commented before but actually i think we're done here. Sweet.
mlncn commented 2019-02-22 06:20:11 +00:00 (Migrated from gitlab.com)

marked the checklist item Configure sensible defaults as completed

marked the checklist item **Configure sensible defaults** as completed
mlncn commented 2019-02-22 06:20:16 +00:00 (Migrated from gitlab.com)

marked the checklist item Remove [node:summary] default value from description metatags as completed

marked the checklist item **Remove [node:summary] default value from description metatags** as completed
mlncn commented 2019-02-22 06:20:16 +00:00 (Migrated from gitlab.com)

marked the checklist item Remove [site:name] from title metatag (it makes our page titles too long) as completed

marked the checklist item **Remove [site:name] from title metatag (it makes our page titles too long)** as completed
mlncn commented 2019-02-22 06:20:19 +00:00 (Migrated from gitlab.com)

marked the checklist item Update image metatag default value to [node:field_image:entity:url] as completed

marked the checklist item **Update image metatag default value to [node:field_image:entity:url]** as completed
mlncn commented 2019-02-22 06:22:23 +00:00 (Migrated from gitlab.com)

mentioned in commit ff600a4cdb

mentioned in commit ff600a4cdb70d8fabb53a2ed0d5cd6582cad7f9d
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: agaric/agaric-coop#177
No description provided.