aem-core-wcm-components icon indicating copy to clipboard operation
aem-core-wcm-components copied to clipboard

[Page] Extend meta attributes

Open gabrielwalt opened this issue 5 years ago • 12 comments

As a web producer, I want the pages of my site to be enhanced with Open Graph and SEO metadata, so that linking to my pages in social media makes the preview display relevant information.

As for the OpenGraph tags, typical requirements are to have the following:

<meta property="og:title" content="<title>"/>
<meta property="og:type" content="website"/>
<meta property="og:description" content="<description>"/>
<meta property="og:image" content="<page image>"/>
<meta property="og:url" content="<url>" />

The social media tags typically look like so:

<meta property="fb:page_id" content="<account>"/>
<meta property="twitter:account_id" content="<account>"/>
<meta name="twitter:title" content="<title>"/>
<meta name="twitter:site" content="<handle> "/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:description" content="<description>"/>

Additionally, there also should be a canonical tag for SEO purposes: <link rel="canonical" href="<canonical-url>"/>

gabrielwalt avatar Jul 11 '19 07:07 gabrielwalt

https://github.com/joshbuchea/HEAD#meta

This is a great reference for the meta tags.

chetanyajain avatar Sep 07 '19 16:09 chetanyajain

Hey, was just thinking about the implementation of above enhancement but I've got a question. Should this tags be enabled by default for any page rendered by the Page component or should an author have an option to enable them if he wants to (for example via Social Media tab in page properties)?

Another question:

<meta property="fb:page_id" content="<account>"/>
<meta property="twitter:account_id" content="<account>"/>

Should this meta properties be configurable per page by author or should they be configured for the whole site (if for whole site, where would you like it to be)?

dymitrs avatar Sep 16 '19 06:09 dymitrs

Social tags, I feel adding it per site makes sense (preferably at Page properties). We need to keep MSM in mind to define the site definition i.e., the site can be for a country, or the country & language can be a sub-domain or subfolder for the main .com site.

chetanyajain avatar Sep 17 '19 13:09 chetanyajain

@chetanyajain Thanks for the reply and the proposition but I think that setting this up in Page policy is a better option because by doing that this way we don't make it harder for authors. Configuration on Page properties could be an improvement for the future. I encourage for code review :) We would surely use the above feautures in our project.

dymitrs avatar Sep 20 '19 10:09 dymitrs

Can we please also include an option for follow/nofollow and index/noindex ?

Tylopilus avatar Jun 07 '21 19:06 Tylopilus

With the page v3, all pages should get the following meta tags:

<link rel="canonical" href="<canonical-url>"/>
<meta property="og:title" content="<seo title>"/>
<meta property="og:type" content="website"/>
<meta property="og:description" content="<description>"/>
<meta property="og:image" content="<page featured image>"/>
<meta property="og:image:alt" content="<page featured image alt text>"/>
<meta property="og:image:width" content="<page featured image width>"/>
<meta property="og:image:height" content="<page featured image height>"/>
<meta property="og:url" content="<url>" />

gabrielwalt avatar Aug 03 '21 08:08 gabrielwalt

@adobe export issue to Jira project SITES as Story

jckautzmann avatar Oct 12 '21 15:10 jckautzmann

:white_check_mark: Jira issue SITES-3308 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Oct 12 '21 15:10 github-jira-sync-bot

:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): SITES-3308

github-jira-sync-bot avatar Oct 12 '21 15:10 github-jira-sync-bot

good point @Tylopilus, we have https://github.com/adobe/aem-core-wcm-components/issues/1847 for that.

gabrielwalt avatar Nov 19 '21 13:11 gabrielwalt

@gabrielwalt I am using page v3 but still cant see og tags, is there an option I am missing to turn them on/off? I dont see them on wknd site either which also uses page v3.

kashlokesh avatar May 19 '22 19:05 kashlokesh

@gabrielwalt Below is the list of features v3 has, none speaks about OG tags , which I found on https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wcm/components/page/v3/page

Features Editable templates SEO meta title, tagging and language definition Canonical link, alternate language links and robots tags Page title, subtitle, description and thumbnail Navigation title, or hide from navigation Vanity URL, page alias and redirection On/Off time and launches Blueprints and live copy Closed user groups and permissions Cloud services

kashlokesh avatar May 19 '22 19:05 kashlokesh

@gabrielwalt @kashlokesh is there an option to enable og tags in the page? I don't see them either, using v3.

ericvangeem avatar Oct 19 '22 02:10 ericvangeem