Closed brown-allen closed 5 years ago
First Building the website makes edits to the site files (not the RMarkdown files). Therefore it this set needs to take place before staging, committing, and pushing to GitHub. So the revised order is:
Second
As your site grows and/or the code becomes more resource intensive (and therefore takes more time to build) it sometimes can make sense to only build those files that change, not the entire site (which is what happens by default when you click the 'Build > Build Website' button in the RStudio pane). If you are adding a new page to the site, however, and you need to add this page to the _site.yml
file, then you will need to build the entire site (correct me if I'm wrong Mike).
To (re)build a specific page work from the console and use this command:
rmarkdown::render_site("page_name.Rmd")
Thanks for this, and the command.
@francojc, yep adding pages generally means updating the .yml
file and rebuilding the entire site.
@brown-allen thanks for this question!
A trick that seems to work for me if I only edit text of 1-2 files is to use knit button on each modified RMD file then push them normally. Edited html versions get posted to web site without full rebuild. Good trick for quick changes (typos, etc.) Dan
On Thu, Jan 10, 2019 at 7:55 AM Michael DeWitt notifications@github.com wrote:
@francojc https://github.com/francojc, yep adding pages generally means updating the .yml file and rebuilding the entire site.
@brown-allen https://github.com/brown-allen thanks for this question!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/WFU-TLC/flc_discussion_board/issues/7#issuecomment-453086506, or mute the thread https://github.com/notifications/unsubscribe-auth/ApROuVhXkdbatRYeHTOM_KMk0QndgoTSks5vBzhJgaJpZM4Z35vF .
--
A. Daniel Johnson, Ph.D.Teaching Professor Rm. 214 Winston Hall
Wake Forest UniversityDepartment of Biology Rm. 226 Winston Hall 1834 Wake Forest Road Winston-Salem, NC 27109-6054
p- 336.758.5320 f- 336.758.6008 e- johnsoad@wfu.edu w- http://college.wfu.edu/biology/people/faculty/johnsonad/
The Adapa Project
*Helping ALL students learn successfully*w- www.adapaproject.org
Yes, the knit button in RStudio effectively runs the code I provided earlier without having to get involved with the Console. Nice addition to this discussion @adanieljohnson. Thanks.
During Session 4 I was having trouble updating my website. I was making edits int he correct places, committing these changes, and pushing them to GitHub. However, I was forgetting to actually Build the website (it was either Jerid or Mike who pointed out this very straightforward error). Updating the website involves:
First - Does that process look correct?
Second - Is there any best practice for how often I Build the Website? For instance, these sites build pretty quickly, int heir current, but is that always the case? Is it worth simply knitting my .rmd to confirm that the edits I made are correct, rather than building each time to confirm? Perhaps it doesn't matter at all, and I should just do what's comfortable? Any thoughts?