kylemarsh / jekyll-gallery-generator

:ledger: Jekyll plugin to generate image galleries from directories
MIT License
8 stars 1 forks source link

Regen pages upon album update #21

Open airencracken opened 9 years ago

airencracken commented 9 years ago

Seems like something that is begging to use inotify() to regenerate album pages when new images are dropped into the directory.

kylemarsh commented 9 years ago

Hmm...that sounds really awesome. I think we should look into something like this, but I'm not sure inotify() itself is quite right. I've never used it before, so I could be incorrect in this, but it looks to me as though inotify() is a system call that you can use to trigger behavior in a running daemon. Jekyll, however, doesn't leave anything running normally. If something like WordPress is analogous to a REPL, then Jekyll would be more of a compiler -- you run it once and it spits out some output and then you can do stuff with the output without needing jekyll around.

If there's some way to put a script in a directory that gets fired off when that directory changes, though, we could have the generator drop the appropriate script in each album directory and use that to fire off jekyll build?