Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a rendering step that uses different _bookdown.yml file(s) #176

Open
KatherineCox opened this issue Nov 22, 2022 · 3 comments
Open

Add a rendering step that uses different _bookdown.yml file(s) #176

KatherineCox opened this issue Nov 22, 2022 · 3 comments

Comments

@KatherineCox
Copy link
Collaborator

@avahoffman how hard would this be?

A lot of our GDSCN books are aimed at instructors. It would be nice if we could use a different _bookdown.yml file to render the student-facing content in a stand-alone output. Two things I could imagine doing with this:

  1. Render the student instructions to docx. As is, the complete book gets rendered to the docx file. Instructors can then edit it to keep only the relevant chapters if they want, but it would be nice for this to happen automatically.
  2. Turn the student instructions into a Leanpub course (I haven't ever made a Leanpub course yet, so not sure what's involved)

I looked into this a little bit on the bookdown side, and I didn't see a way to manage this with a single call to bookdown::render_book() (i.e. by changing settings in _output.yml or something) so...

  • I think we'd need to do this within a github action, calling render_book() for each variant of _bookdown.yml
  • All the code and images would get run/downloaded all over again for each version, so it would be a bit time consuming. Maybe only run it automatically on pushes to main, and have the option to run it manually so that we could preview in PRs as needed.

@cansavvy is this something that would be useful for OTTR? I filed the issue here in AnVIL_Template since my use case is fairly specific to our GDSCN books, where we're writing a book aimed at instructors which contains chapters for them to give their students. But perhaps there are other more general use cases?

@avahoffman
Copy link
Contributor

@KatherineCox not hard. I can play around with something!

@avahoffman
Copy link
Contributor

@KatherineCox I've created a way to render a student guide from separate bookdown and output ymls over at #177 . For now, Leanpub will use the original bookdown set. If the student materials need to end up on Leanpub, I wonder if it warrants its own repo at that point.

@KatherineCox
Copy link
Collaborator Author

Awesome!

re: Leanpub - I haven't dug into the details of either the GitHub actions or Leanpub myself, so I'm happy to follow your recommendations there. If it's too complicated to make that happen in a single repo, it's not that hard to make another repo and either sync or borrow_chapter to keep them up-to-date with each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants