- Added
cover_imagefront matter field to blog posts - Updated
_layouts/post.htmlto display cover images when present - Added responsive CSS styles in
public/css/custom.scssfor proper display across devices
Key Finding: When developing locally, images sometimes do not display properly due to path resolution issues.
Working Solutions:
- Relative paths (
./images/filename.svg) - ✅ Works with file:// protocol - File protocol (
file:///full/path/to/image) - ✅ Works for local testing - Jekyll server with localhost/127.0.0.1 - ✅ Works when Jekyll server is running
Non-working Solutions:
- Absolute paths (
/images/filename.svg) - ❌ Fails with file:// protocol - localhost URLs without server - ❌ Connection refused when Jekyll isn't running
- 127.0.0.1 URLs without server - ❌ Connection refused when Jekyll isn't running
For local development, either:
- Use Jekyll server:
bundle exec jekyll serve --host 127.0.0.1 --port 4000 - Use relative paths in Jekyll templates with
{{ site.baseurl }}prefix - Test with file:// protocol using relative paths for quick validation
- Responsive design with different max-heights for desktop (400px), tablet (250px), and mobile (200px)
- Hover effects with subtle scale transform
- Proper shadow and border-radius for visual appeal
- Mobile-specific margin adjustments for better display
- Supported formats: SVG (preferred), PNG, JPG - all handled gracefully by CSS
- Size handling: CSS automatically scales images responsively:
- Desktop: max-height 400px
- Tablet: max-height 250px
- Mobile: max-height 200px
- Recommended dimensions: 800x400px aspect ratio for optimal display
- File size: Keep under 50KB for performance (SVG typically 2-5KB)
- Alt text: Automatically uses page title for accessibility
- Storage: Place images in
/images/directory
- ✅ Images scale gracefully across all device sizes
- ✅ Posts without cover images display normally
- ✅ Performance impact minimal (2.3KB SVG)
- ✅ All image formats (SVG, PNG, JPG) supported
- ✅ Responsive breakpoints working properly