Be sure to start with the provided index.Rmd. It has an important htmlTemp code chunk at the top.
htmlTemp
Copy the js folder and footer.html. These are required for the code folding.