koenbok/Cactus — pull request #37 by dustMason (2013-01-14 23:56:49+00:00)
Title: New plugin: blog_images

Hi Koen,

I'm brand new to python, so please excuse any mistakes.

This is a new plugin (inspired by a similar one for docpad called "associated-images") that allows users of the blog.py plugin to place image files in a specially named directory within the static directory. For example:

Given the following file structure:
```
├── static
│ ├── blog-post-images
│ │ └── first-post
│ │ ├── 4torresBackyard.jpg
│ │ ├── BosqueTalladores_Panorama1.jpg
│ │ ├── ChillanSki_Panorama1.jpg
│ │ └── cachiPanorama.jpg
...
├── pages
│ ├── posts
│ │ ├── first-post.html
```

The plugin will allow you to load an array of image paths like so in any page:
```
{% for image in images %}

{% endfor %}
```