Closed oharac closed 2 weeks ago
For the sample lessons, I simply added a YAML header (or modified if there already was one) to include a title: XXX
field. When rendering the book, that title shows up in the nav bar and the top of the lesson. A nice clean solution!
I removed the title from the session_XX.qmd
templates, since it is redundant.
I successfully created a mock book!
However, some of the titles are not working when I render the book using quarto preview
Issues I'm seeing:
session_xx.html
name (see image below)Example pic
Hmm, it didn't show up like that on mine... let me see if I can replicate here, otherwise we can take a look at yours on Monday?
You can try cloning the repo I created and then run quarto preview
on the terminal and see what happens.
I cloned your repo and get those same issues... It seems to be related to the YAML header if it has more than one line in it. Weird that it is inconsistent from one platform to another! I should try it on my Macbook instead of Windows to see if it's specific to Mac
Try updating your packages - devtools::install_github('nceas-learning-hub/coreR')
and devtools::install_github('nceas-learning-hub/coreRlessons')
- I can't get the problem to replicate when running my own repo, so maybe there's something hiding in one of the older .yml files or whatnot inside your repo if created from an older version of the package.
Once you've updated packages, you can delete the lessons, images, data folders, and then run coreR::setup_lessons(lessons = <selected lessons>, overwrite = TRUE)
- see if it still happens for you!
Closing this for now - but will open a separate issue for important formatting things
Currently, it looks like in the
session_XX.qmd
file, the YAML header includes a title for the lesson, e.g.,session_01.qmd
for the recent coreR looks like:But, that title is nowhere to be found in
reproducibility-intro.qmd
so it looks like it has to be manually written for eachsession_XX.qmd
document. To automate this, I think there are a few options, not sure exactly which will work best:reproducibility-intro.qmd
), include a YAML header with title (and perhaps other metadata including author, date). Drop thetitle:
from thesession_01.qmd
and it should use the title from the included file instead.lesson_title: blah blah blah
- we can grab that text automatically, populate the title field insession_XX.qmd
, and Quarto will ignore the field in the included qmd.<!-- title: blah blah blah -->
.In any case, this would require updating most or all of the lesson qmds to explicitly include a title (and perhaps other metadata) - which I think is a good thing!