'R Markdown render_site() .Rmd file order

I would like to create a HTML website for my results, with R markdown. So far I found out that I need to use _site.yml and index.Rmd as a starting point. I built up my .yml and all the .Rmd files I want into my website.

I run the code rmarkdown::render_site() and it all works fine, but it renders the .Rmd files in my directory in the order they are in there. The problem with it, is that I need the index.Rmd to be rendered first, because it contains a all the necessary data what my other .Rmd files need.

So my question is, that is how can I tell rmarkdown::render_site() to render the index.Rmd file first?

Thank you for your help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source