Skip to content

Conversation

@solrevdev
Copy link
Owner

Blog Post Cover Images Feature

Summary

Adds responsive cover image support for blog posts with graceful fallbacks and comprehensive documentation.

Key Features

  • Responsive Design: Automatic scaling across desktop (400px), tablet (250px), and mobile (200px)
  • Multiple Format Support: SVG (preferred), PNG, JPG all handled gracefully
  • Graceful Fallback: Posts without cover images display normally
  • Performance Optimized: CSS-based scaling with hover effects
  • Production Ready: Comprehensive testing and documentation

Technical Implementation

Files Modified

  • _layouts/post.html: Added conditional cover image display
  • public/css/custom.scss: Responsive CSS with breakpoints and hover effects
  • _config.yml: Updated Jekyll exclusions for agent markdown files
  • .github/copilot-instructions.md: Production-ready usage guidelines
  • claude.md: Comprehensive development documentation

Usage

Add to any blog post front matter:

cover_image: /images/filename.ext

Image Guidelines

  • Formats: SVG (preferred, 2-5KB), PNG, JPG (keep under 50KB)
  • Dimensions: Any size works - CSS handles responsive scaling automatically
  • Recommended: 800x400px aspect ratio for optimal display
  • Storage: Place in /images/ directory

Testing Results

  • ✅ Responsive breakpoints working across all device sizes
  • ✅ Image formats (SVG, PNG, JPG) all display correctly
  • ✅ Posts without cover images unaffected
  • ✅ Performance impact minimal
  • ✅ Hover effects and visual polish working

Impact on Existing PRs

Immediate Enhancement Opportunities

Two existing blog post PRs can be enhanced with cover images:

  1. PR docs(blog): add building winget search post #13 (winget search): Add cover image showing Windows terminal or winget logo
  2. PR feat(posts): add ytx .NET global tool tutorial blog post #10 (ytx tool): Add cover image showing .NET CLI or development tools

Enhancement Process

For existing PRs, simply add to front matter:

cover_image: /images/descriptive-filename.svg

Local Development Notes

During local development, images display properly when:

  • Using Jekyll server: bundle exec jekyll serve --host 127.0.0.1 --port 4000
  • Accessing via http://localhost:4000 or http://127.0.0.1:4000

Test Plan

  • Desktop responsive design (1200px+)
  • Tablet responsive design (768px)
  • Mobile responsive design (480px)
  • Posts with cover images display correctly
  • Posts without cover images unaffected
  • Multiple image formats (SVG, PNG, JPG)
  • Performance and file size optimization
  • Jekyll build process integration

Related Issue

Closes #14

🤖 Generated with Claude Code

solrevdev and others added 4 commits September 27, 2025 21:03
- Add cover_image front matter field to latest blog post
- Create sample SVG cover image for SeedFolder evolution post
- Update post.html layout to display cover images when present
- Add responsive CSS styles for cover images with mobile optimization
- Include hover effects and proper styling for desktop and mobile views

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create claude.md with cover image implementation notes
- Add GitHub Copilot instructions with local development guidelines
- Document image URL behavior during local development
- Include responsive design breakpoints and testing procedures
- Remove test file after validation

Key insight: Use localhost/127.0.0.1 domains for proper image display
during local development, as relative paths work with file:// protocol
but absolute paths fail without a running server.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update documentation with comprehensive size handling guidelines
- Configure Jekyll to exclude agent markdown files from build process
- Add case-insensitive exclusions for claude.md, warp.md, agent.md variants
- Remove test files and ensure clean production state
- Update GitHub Copilot instructions with production guidelines
- Cover images now fully responsive and production-tested

Features:
- Automatic responsive scaling (400px desktop, 250px tablet, 200px mobile)
- Support for SVG (preferred), PNG, JPG formats
- Graceful handling of posts without cover images
- Minimal performance impact (2.3KB typical SVG)
- Comprehensive testing across all device sizes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove temporary test images that were created during cover image implementation testing. These files are no longer needed in the repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@solrevdev solrevdev merged commit 3e23e1b into master Sep 29, 2025
1 check passed
@solrevdev solrevdev deleted the feature/blog-cover-images branch September 29, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Blog Post Cover Images Support

2 participants