{"action":"created","issue":{"url":"https://api.github.com/repos/swcarpentry/lesson-example/issues/30","repository_url":"https://api.github.com/repos/swcarpentry/lesson-example","labels_url":"https://api.github.com/repos/swcarpentry/lesson-example/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/swcarpentry/lesson-example/issues/30/comments","events_url":"https://api.github.com/repos/swcarpentry/lesson-example/issues/30/events","html_url":"https://github.com/swcarpentry/lesson-example/pull/30","id":161514829,"number":30,"title":"tooling to deal with episodes written using Rmarkdown","user":{"login":"fmichonneau","id":5502922,"avatar_url":"https://avatars.githubusercontent.com/u/5502922?v=3","gravatar_id":"","url":"https://api.github.com/users/fmichonneau","html_url":"https://github.com/fmichonneau","followers_url":"https://api.github.com/users/fmichonneau/followers","following_url":"https://api.github.com/users/fmichonneau/following{/other_user}","gists_url":"https://api.github.com/users/fmichonneau/gists{/gist_id}","starred_url":"https://api.github.com/users/fmichonneau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmichonneau/subscriptions","organizations_url":"https://api.github.com/users/fmichonneau/orgs","repos_url":"https://api.github.com/users/fmichonneau/repos","events_url":"https://api.github.com/users/fmichonneau/events{/privacy}","received_events_url":"https://api.github.com/users/fmichonneau/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-21T19:03:25Z","updated_at":"2016-06-21T21:12:39Z","closed_at":"2016-06-21T21:12:39Z","pull_request":{"url":"https://api.github.com/repos/swcarpentry/lesson-example/pulls/30","html_url":"https://github.com/swcarpentry/lesson-example/pull/30","diff_url":"https://github.com/swcarpentry/lesson-example/pull/30.diff","patch_url":"https://github.com/swcarpentry/lesson-example/pull/30.patch"},"body":"This is my proposal to deal with Rmarkdown files with the new template.\r\n\r\nCurrently, episodes will live in the `_episodes_rmd` folder. These files are just like the markdown files that are normally written for lessons that don't use Rmarkdown, except they can include chunks of R code. I included an example Rmd file in this PR (_episodes_rmd/06-rmarkdown-example.Rmd)\r\n\r\nOn the technical side:\r\n- I modified the hook functions to make sure that the output from knitr get stylized correctly with the new template\r\n- the figures are generated in the correct place, and the path gets modified to match where they will live once the website is generated\r\n- all figures generated by a Rmarkdown file get prefixed with swc-rmd- so they can be identified easily by the Makefile and removed by `make clean`\r\n- I added a target lesson-rmd that calls a bash script. This script checks whether there is a `_episodes_rmd` folder and if it exists, the Rmd files get converted into md files inside the `_episodes` folder. This approach should mean that the Makefile will run smoothly if there is no `episodes_rmd`.\r\n\r\nIt seems the Makefile can be improved, as the Rmd files get converted to md each time `make serve` or `make site` is invoked, even if the Rmd files don't change.\r\n\r\nIf the approach seems reasonable, I can try to start converting a few episodes for one of our R lessons to make sure everything runs smoothly."},"comment":{"url":"https://api.github.com/repos/swcarpentry/lesson-example/issues/comments/227573696","html_url":"https://github.com/swcarpentry/lesson-example/pull/30#issuecomment-227573696","issue_url":"https://api.github.com/repos/swcarpentry/lesson-example/issues/30","id":227573696,"user":{"login":"fmichonneau","id":5502922,"avatar_url":"https://avatars.githubusercontent.com/u/5502922?v=3","gravatar_id":"","url":"https://api.github.com/users/fmichonneau","html_url":"https://github.com/fmichonneau","followers_url":"https://api.github.com/users/fmichonneau/followers","following_url":"https://api.github.com/users/fmichonneau/following{/other_user}","gists_url":"https://api.github.com/users/fmichonneau/gists{/gist_id}","starred_url":"https://api.github.com/users/fmichonneau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmichonneau/subscriptions","organizations_url":"https://api.github.com/users/fmichonneau/orgs","repos_url":"https://api.github.com/users/fmichonneau/repos","events_url":"https://api.github.com/users/fmichonneau/events{/privacy}","received_events_url":"https://api.github.com/users/fmichonneau/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T21:12:39Z","updated_at":"2016-06-21T21:12:39Z","body":"Replaced by:\r\nhttps://github.com/swcarpentry/styles/pull/56 (add tools to style repo instead)\r\nhttps://github.com/swcarpentry/lesson-example/pull/31 (add just an example lesson in this repo)"}}
{"actor":{"display_login":"fmichonneau"}}