SpaCE-Lab-MSU / MSUGradSpatialEcology

Source code toe generate the labs for MSU Spatial Ecology Course. See the website for labs.
https://space-lab-msu.github.io/MSUGradSpatialEcology/
1 stars 0 forks source link

Lab4 not showing up #6

Closed plzmsu closed 4 years ago

plzmsu commented 4 years ago

@billspat not sure why Lab 4 isn't posting on html site...

billspat commented 4 years ago

I don't see a lab4 HTMLin the main folder, only in the Docs folder,, the menus in the Lab1-3 HTML file have not been updated to include lab 4, and those HTML files in the doc folder are 9 days old (normally they would be replaced by rmarkdown::render_site()

Lab 4 is up on github, with the correct menus even:

https://space-lab-msu.github.io/MSUGradSpatialEcology/lab4_autocorrelation.html

Is it possible that the other files in /docs were not staged/added by git when you commited, so github still has the older version of lab1-3 without the link to lab 4? the whole site in /docs needs to be staged and committed every time (because the HTML menus in those files are updated, even the labs are not.

plzmsu commented 4 years ago

Ok - yes I did not render the whole site, just the lab4 one. This produced the index.html correctly, but I see what you're saying about the tabs at the top on each of the other pages not showing "Lab 4". Maybe I can figure out a way to just edit those small parts next time in the html docs bc it's annoying to have to render the whole site.

billspat commented 4 years ago

re-rendering the whole site is a big downside to this simple tool - there is no (automatic) way to only update the HTML menu portion of the rendered files and leave the rest alone. I think this limitation is why the rmardkdown authors encourage the use of blogdown/bookdown instead. However, if there is a problem rendering previous pages and you just need to render one new lab and update the navigation on every page, I have thought of a way to do that. If it gets really cumbersome then I an can Investigate using bookdown ( I don't think the lab markdown content will have to be changed at all).

plzmsu commented 4 years ago

A quick note: once the site is fully rendered once to include a new page like Lab4 (i.e., rendered entire site), you can then just simply update the Lab 4 docs via rmarkdown::render_site("Lab4.Rmd") to make updates to just 1 page.

billspat commented 4 years ago

that's a great find! Perhaps it's worth creating placeholders for each lab now, so that navigation is built on all of those pages, and then you won't have to re-render all the previous labs when you can get to the next lab.