[PAGES-305] Provide meta tags for SEO support Created: 08/Jun/20  Updated: 23/Aug/22

Status: Open
Project: Magnolia pages module
Component/s: SPA Renderer
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Tu Bo Xuan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File HelmetHeader.js    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Team: AuthorX

 Description   

Dear PD,

Some clients are requesting for dynamic SEO keywords generating while rendering a template with SPA renderer. Currently, there is no logic in "render" method to cover that.

 

Thank you very much! 



 Comments   
Comment by Scot Rhodes [ 08/Jun/20 ]

Do you mean "dynamic" as in the editors can add arbitrary meta tags? That should be pretty easy to set up. I've done something similar where metadata tags can be created, then using React's Helmet library, you can inject those tags on the fly. I'm attaching a very rough react script example quickly thrown together.HelmetHeader.js

This is clearly not dynamic, but you could simply replace the 
<meta name='XYZ' ... with a loop of something like props.metaTags.

 

The reference to this HelmetHeader does not need to be injected into the HEAD of the HTML, either. You can just reference that somewhere in a parent React Component, and Helmet will inject that into the header of that page.

Comment by Tu Bo Xuan [ 09/Jun/20 ]

Thank srhodes,

That's great! However, there are some other cases that client wants to generate different seo keywords regarding different requesting item (such as product detail). So, "dynamic" here means the CMS should provide a "rule engine" at server side to generate SEO keywords. Indeed, we can also define those "rules" at react side together with HelmetHeader.js. But, it can not use "configurable" functionality of Magnolia CMS.

Hope my explanation makes sense!

Again, thank you very much!

Tu Bo.

 

Comment by Scot Rhodes [ 09/Jun/20 ]

Ah yes, that does make sense and would require some new implementations. That does sound quite useful, I'll be following the progress of this ticket. Great suggestion Tu Bo.

Comment by Tu Bo Xuan [ 15/Jun/20 ]

Absolutely, srhodes!

Thank you very much! 

Comment by Christopher Zimmermann [ 20/Jul/21 ]

tu.bo is the main thing that they want the server to render SEO metadata into the page, and have the SEO data be different for each page, such that each unique page has different SEO metadata upon it's first load? The SPA renderer does not do this currently - it only loads a non server-processed page. And this page loads the SPA.

We do not have plans to implement that at the moment. But it is interesting. I would be happy to discuss further with client (or with you Tu Bo) the exact needs. For example I am wondering if SEO metadata is enough, wouldn't they want the full page content available for better search indexing?

The approach many customers take for public facing SPA based sites is to use a system like react-static, gatsby, next.js to render out static pages based on the SPA (jamstack approach), then each page has the SEO metadata.

Generated at Mon Feb 12 06:17:38 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.