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

Change output directory of student guide #239

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

KatherineCox
Copy link
Collaborator

@KatherineCox KatherineCox commented Feb 24, 2025

What

Set the output directory for the student guide to be student-guide/docs

Why?

I think it's confusing to have the .md files cluttering up the student-guide directory, when they are files that nobody should be touching. (They are generated and then not removed during the rendering process, see https://forum.posit.co/t/why-does-bookdown-keep-the-md-files-with-new-session-yes/47684 for why).

This PR:

  • sets output_dir for the student guide to "student-guide/docs"
  • deletes extra rendered files in student-guide/
  • updates pull-request.yml and render-all.yml so they can find it
    • Looks like render-all doesn't need any changes
  • updates 09-student_guide.Rmd -> student-guide.Rmd, adds some instructions, and adds it to the AnVIL_Template book so it gets rendered
  • removes student-guide/_bookdown.yml from sync.yml
    • Then people won't have to resolve conflicts every time we send out a sync
    • I don't think this will cause problems? I'm labeling the important lines with a comment that says # Do Not Change
  • TODO: After merging into main, confirm that the link to the student guide works

Note: I took out this line course_name=$(head -n 1 student-guide/_bookdown.yml | cut -d'"' -f 2| tr " " "-") from pull-request.yml because:
a) It was fragile, it broke when I moved the settings in _bookdown.yml around
b) We're not using it, we've hardcoded the name of the file as "Student_Guide.docx"

Then, in other repos I will:

  • update pull-request.yml (by sending out a sync)
  • Add/update student-guide.Rmd, student-guide/_bookdown.yml, and student-guide/_output.yml as needed
  • Delete extra rendered files in student-guide/
  • Turn student-guide "on" in config_automation.yml - I don't think there's any reason not to have it on by default? There's no link to it in the rendered version of the book unless someone adds it manually.

Copy link
Contributor

github-actions bot commented Feb 24, 2025

⚠️ broken url errors ⚠️
There are broken url errors that need to be addressed.
Click here ➡️ for broken url errors!
Add errors that aren't errors to the resources/ignore-urls.txt file of this repo.
If you are having troubles see this guide
Comment updated at 2025-02-25-15:27:44 with changes from fc01746

Copy link
Contributor

github-actions bot commented Feb 24, 2025

No spelling errors! 🎉
Comment updated at 2025-02-25-15:27:42 with changes from fc01746

Copy link
Contributor

github-actions bot commented Feb 24, 2025

Re-rendered previews from the latest commit:

* note not all html features will be properly displayed in the "quick preview" but it will give you a rough idea.

Updated at 2025-02-25 with changes from the latest commit fc01746

@KatherineCox
Copy link
Collaborator Author

Hey @avahoffman what do you think about moving the output_dir of the student guide one level down, to student-guide/docs?

It was a bit confusing to have rendered files showing up in student-guide/ - it took me a minute to realize e.g. that student-guide/index.md was a rendering artifact, and that the source was still index.Rmd in the top level directory. I thought it would be less confusing to have all generated files sent to a subdirectory, so that the only files visible in student-guide/ are the ones you would edit.

Regardless of whether or not we change this, I'm planning to go through and fix all the repos that were having trouble rendering the student guides, so this seemed like a good time to make any changes.

So, two things:

  1. Let me know what you think of this PR
  2. Any other adjustments before I send out another sync and go update the student guides for all the repos?

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

Successfully merging this pull request may close these issues.

1 participant