jjallaire/rcpp-gallery — pull request #57 by olmjo (2014-10-09 23:11:15+00:00)
Title: add initial mockup of figure support

I've got an initial mockup of figure support. I don't like it much, but it's a first cut. I'd like to here some pushback so it can be polished.

From a contributor's perspective:
Only figures with a name prefixed by 'fig' will be written to the directory that is served, as in
```{r, 'fig-a-histogram''}
hist(rnorm(35))
```
This 'fig' assumption is used in parsing the slug from the full filename. I couldn't think of something more general that didn't rely on parsing the markdown.

From knitr's perspective:
Figures are written to the same directory they have always been when knitting.

From /rcpp-gallery/Makefile's perspective:
I put a wrapper recipe around the main jekyll build. This is because in order to "work", the slug directories under `articles` must already exist. So, now there is
```
all: knit jek img
```

Beyond that, there are definitely assumptions built in to `cp-img.sh`. E.g., I think the sed command relies on non-BSD sed and it assumes the `_site/articles/:title` structure.

So, is this a path worth continuing on? What changes would work better from your perspective?