Divyapahuja31 opened a new pull request, #426:
URL: https://github.com/apache/grails-static-website/pull/426

   ##  Description
   
   This PR significantly improves the website's SEO (Search Engine 
Optimization) and SMO (Social Media Optimization) by implementing dynamic Open 
Graph meta tags.
   
   ### The Problem
   Previously, the `og:url` and `og:image` tags were hardcoded or static. This 
meant that when users shared specific blog posts or documentation pages on 
platforms like Twitter, LinkedIn, or Slack, the preview often displayed generic 
information or the wrong image, leading to poor user engagement.
   
   ### The Solution
   I have updated `RenderSiteTask.groovy` and `BlogTask.groovy` to dynamically 
generate metadata:
   
   1.  **Dynamic `og:url`**: Each specific page now reports its permalink 
instead of the site root, ensuring social platforms point users to the correct 
destination.
   2.  **Smart `og:image`**:
       *   **Blog Posts**: If a post defines a custom image, it is now 
correctly used for the preview.
       *   **Videos**: YouTube video posts now automatically fetch and use the 
high-quality video thumbnail.
       *   **Fallback**: Pages without specific media gracefully fall back to 
the default Grails logo.
   3.  **Cleanup**: Removed hardcoded `og:image:width` and `og:image:height` 
tags (300x300), which were causing distortion for non-square images.
   
   ## Impact
   
   These changes ensure that all shared links from the Grails website look 
professional, relevant, and visually appealing, directly improving the brand's 
presence on social media.
   
   ## Checklist
   - [x] Verified `og:url` points to the correct permalink on blog posts and 
pages.
   - [x] Verified `og:image` correctly picks up blog post images.
   - [x] Verified fallback to default Grails logo for pages without images.
   - [x] Removed incorrect fixed image dimensions.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to