Skip to content

Commit f6d6338

Browse files
solrevdevclaude
andcommitted
docs: Add development documentation for cover images
- 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>
1 parent cdc5615 commit f6d6338

File tree

5 files changed

+97
-0
lines changed

5 files changed

+97
-0
lines changed

.github/copilot-instructions.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# GitHub Copilot Instructions
2+
3+
## Project Overview
4+
This is a Jekyll-based static blog for solrevdev.com using the Hyde theme with custom modifications.
5+
6+
## Key Development Guidelines
7+
8+
### Blog Posts
9+
- Located in `_posts/` directory
10+
- Use Jekyll front matter with these fields:
11+
- `layout: post`
12+
- `title: [Post Title]`
13+
- `description: [SEO description]`
14+
- `summary: [Brief summary]`
15+
- `cover_image: [/images/filename.ext]` (optional)
16+
- `tags: [array of tags]`
17+
18+
### Cover Images
19+
- Store in `/images/` directory
20+
- Use `cover_image: /images/filename.ext` in front matter
21+
- Supported formats: SVG (preferred), PNG, JPG
22+
- Recommended dimensions: 800x400px
23+
- Automatically responsive across desktop, tablet, and mobile
24+
25+
### Local Development Image Issues
26+
**Important**: During local development, images may not display properly due to URL resolution:
27+
28+
**Solutions**:
29+
1. **Use Jekyll server**: `bundle exec jekyll serve --host 127.0.0.1 --port 4000`
30+
2. **Use localhost domain**: `http://localhost:4000` or `http://127.0.0.1:4000`
31+
3. **Relative paths work**: with file:// protocol for testing
32+
33+
**Don't use**:
34+
- Absolute paths (`/images/...`) with file:// protocol - will fail
35+
- localhost URLs without running Jekyll server
36+
37+
### Styling
38+
- Custom styles in `public/css/custom.scss`
39+
- Uses SCSS with Jekyll compilation
40+
- Responsive breakpoints: 768px (tablet), 480px (mobile)
41+
- Cover images have hover effects and responsive sizing
42+
43+
### File Structure
44+
```
45+
├── _posts/ # Blog posts
46+
├── _layouts/ # Jekyll layouts
47+
├── _includes/ # Jekyll includes
48+
├── public/css/ # SCSS stylesheets
49+
├── images/ # Blog post images
50+
├── claude.md # Claude development notes
51+
└── .github/ # GitHub configuration
52+
```
53+
54+
### Testing
55+
- Use `test-cover-image.html` for image URL testing
56+
- Test responsive design at 375px (mobile), 768px (tablet), 1200px+ (desktop)
57+
- Screenshots saved in `.playwright-mcp/` directory
485 KB
Loading
190 KB
Loading
308 KB
Loading

claude.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Claude Development Notes
2+
3+
## Blog Cover Images
4+
5+
### Implementation
6+
- Added `cover_image` front matter field to blog posts
7+
- Updated `_layouts/post.html` to display cover images when present
8+
- Added responsive CSS styles in `public/css/custom.scss` for proper display across devices
9+
10+
### Image URL Behavior During Local Development
11+
12+
**Key Finding**: When developing locally, images sometimes do not display properly due to path resolution issues.
13+
14+
**Working Solutions**:
15+
1. **Relative paths** (`./images/filename.svg`) - ✅ Works with file:// protocol
16+
2. **File protocol** (`file:///full/path/to/image`) - ✅ Works for local testing
17+
3. **Jekyll server** with localhost/127.0.0.1 - ✅ Works when Jekyll server is running
18+
19+
**Non-working Solutions**:
20+
1. **Absolute paths** (`/images/filename.svg`) - ❌ Fails with file:// protocol
21+
2. **localhost URLs** without server - ❌ Connection refused when Jekyll isn't running
22+
3. **127.0.0.1 URLs** without server - ❌ Connection refused when Jekyll isn't running
23+
24+
### Development Workflow
25+
For local development, either:
26+
1. Use Jekyll server: `bundle exec jekyll serve --host 127.0.0.1 --port 4000`
27+
2. Use relative paths in Jekyll templates with `{{ site.baseurl }}` prefix
28+
3. Test with file:// protocol using relative paths for quick validation
29+
30+
### CSS Implementation
31+
- Responsive design with different max-heights for desktop (400px), tablet (250px), and mobile (200px)
32+
- Hover effects with subtle scale transform
33+
- Proper shadow and border-radius for visual appeal
34+
- Mobile-specific margin adjustments for better display
35+
36+
### Cover Image Guidelines
37+
- Use SVG format for scalable graphics where possible
38+
- Recommended dimensions: 800x400px for optimal display
39+
- Include descriptive alt text for accessibility
40+
- Store images in `/images/` directory

0 commit comments

Comments
 (0)