This system automatically creates organized image folders for each blog post and provides a simple Jekyll include for referencing images.
npm run create-post-folders
assets/images/posts/[post-slug]/2025-04-2-Getting-Started-With-HDK.md → assets/images/posts/Getting-Started-With-HDK/
## How It Works
### Folder Structure
assets/images/posts/ ├── Getting-Started-With-HDK/ │ ├── diagram.png │ └── demo.gif ├── Tauri-DragAndDrop-Issues/ │ ├── dragdrop_demo.gif │ └── error_screenshot.png └── [other-post-slugs]/
### Post Slug Generation
The script converts post filenames to folder names:
- `2025-04-2-Getting-Started-With-HDK.md` → `Getting-Started-With-HDK`
- `2026-01-14-Tauri-DragAndDrop-Issues.md` → `Tauri-DragAndDrop-Issues`
## Jekyll Include Usage
The `post_image.html` include provides several options:
### Basic Usage
```liquid
<div>
<figure class="post-image-figure">
<img src="/assets/images/posts//image.png"
alt="image.png"
class="post-image"
/>
<caption class="post-image-caption"></caption>
</figure>
</div>
<div>
<figure class="post-image-figure">
<img src="/assets/images/posts//screenshot.png"
alt="Application screenshot"
class="post-image"
/>
<caption class="post-image-caption"></caption>
</figure>
</div>
<div>
<figure class="post-image-figure">
<img src="/assets/images/posts//chart.svg"
alt="Performance chart"
class="post-image"
/>
<caption class="post-image-caption">Memory usage over time</caption>
</figure>
</div>
<div>
<figure class="post-image-figure">
<img src="/assets/images/posts//logo.png"
alt="Logo"
class="small"
/>
<caption class="post-image-caption"></caption>
</figure>
</div>
<div>
<figure class="post-image-figure">
<img src="/assets/images/posts//banner.jpg"
alt="Banner"
class="full-width"
/>
<caption class="post-image-caption"></caption>
</figure>
</div>
<div>
<figure class="post-image-figure">
<img src="/assets/images/posts//icon.png"
alt="Icon"
class="post-image"
/>
<caption class="post-image-caption"></caption>
</figure>
</div>
small - Max width 400pxmedium - Max width 600pxfull-width - 100% width2026-01-15-My-New-Post.md)npm run create-post-folders
assets/images/posts/My-New-Post/
## Benefits
- ✅ **Organized**: Each post has its own image folder
- ✅ **Simple**: Just use the filename, no path needed
- ✅ **Automatic**: Script creates folders for all existing posts
- ✅ **Consistent**: Standardized image styling and structure
- ✅ **Responsive**: Images work well on all device sizes
- ✅ **Accessible**: Proper alt text and semantic HTML
## Manual Folder Creation
If you need to create a folder for a single post manually:
```bash
mkdir "assets/images/posts/Your-Post-Slug"
The post slug follows the pattern of removing the date prefix and .md extension from your post filename.