Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fusepilot/wintersmith-image-generator
wintersmith-image-generator
https://github.com/fusepilot/wintersmith-image-generator
Last synced: about 1 month ago
JSON representation
wintersmith-image-generator
- Host: GitHub
- URL: https://github.com/fusepilot/wintersmith-image-generator
- Owner: fusepilot
- Created: 2015-07-27T12:36:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-12T09:20:20.000Z (over 8 years ago)
- Last Synced: 2024-04-14T04:51:21.427Z (9 months ago)
- Language: CoffeeScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
wintersmith-image-generator
==================Image generator for [Wintersmith](https://github.com/jnordberg/wintersmith)
using [gm](https://www.npmjs.com/package/gm).## Installing
Install globally or locally using npm
```
npm install [-g] wintersmith-image-generator
```And add `wintersmith-image-generator` to your config.json.
```json
{
"plugins": [
"wintersmith-image-generator"
]
}
```Then configure the versions you'd like to generate.
```json
{
"images": {
"match": "**/pictures/*.jpg",
"versions": {
"small": {
"resize": [300, 300]
},
"large": {
"resize": [800, 800],
"sepia": ""
}
}
}
}
```You can use most of the methods specified in the gm docs listed [here](http://aheckmann.github.io/gm/docs.html).
Then use the generated version in your templates.
```jade
h2 original images
- for image in page.parent.pictures._.files
img(src=image.url)h2 resized images
- for image in page.parent.pictures._.images_small
img(src=image.url)
````