ramnathv / poirot

Reproducible Blogging with R Markdown
http://ramnathv.github.com/poirotBlog
32 stars 19 forks source link

Blog Generation #9

Open ramnathv opened 11 years ago

ramnathv commented 11 years ago

One issue I am facing with blog generation is the working directory while generating the html. Here are a couple of thoughts.

  1. The convention most blogging platforms follow is to run the generation command from the root folder, which is usually identified by the presence of a configuration file. I think it is good practice to stick with this convention.
  2. The parsing and rendering functions I wrote all assume that we are in the directory of the Rmd file. I need to figure out a way to modify this behavior with minimal change. For pagify, it is easy since I can just wrap it around an in_dir directive, which will switch to the directory of the Rmd file, parse and render the page, and switch back to the working directory. One issue to handle with care is the link to the page, which must still be relative to the root.