davsclaus opened a new pull request, #1637:
URL: https://github.com/apache/camel-website/pull/1637

   ## Summary
   
   - Add a single shared `assets/img/default-featured.png` (735KB, resized to 
800px)
   - Update `layouts/blog/post.html` and `layouts/partials/header.html` to fall 
back to this shared image when a blog post has no post-specific `featured.png`
   - Delete the 48 identical copies of the 3.8MB camel logo from blog post 
directories
   
   **Size reduction: ~182MB saved** (48 × 3.8MB replaced by 1 × 735KB)
   
   ## How it works
   
   The templates now check for a page-specific featured image first (existing 
behavior), and if none is found, fall back to the shared default via Hugo's 
`resources.Get`:
   
   ```go
   {{ $featured := (.Resources.ByType "image").GetMatch "*featured*" }}
   {{ if not $featured }}
       {{ $featured = resources.Get "img/default-featured.png" }}
   {{ end }}
   ```
   
   Blog posts with their own unique featured images are unaffected — only the 
48 posts that used an identical copy of the generic camel logo are changed. 
Future blog posts can simply omit `featured.png` to get the default.
   
   ## Test plan
   
   - [ ] Verify blog posts that had the duplicate featured.png still show the 
camel logo image
   - [ ] Verify blog posts with unique featured images still show their own 
image
   - [ ] Verify `og:image` meta tag works correctly for both cases
   - [ ] Check the blog listing page renders correctly
   
   Supersedes #1636
   Fixes #1631


-- 
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