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

build: 🔧 add files to auto-build website #4

Merged
merged 8 commits into from
Mar 4, 2025

Conversation

lwjohnst86
Copy link
Member

@arborzhang I added several files to automatically build the website.

Whenever you use a new R package, you need to always run usethis::use_package("PACKAGENAME") (where PACKAGENAME is the package you will use), so that the website builder knows how to install and use it. Just like how you do with the UKB RAP project.

In general, it's good practice to name files all lower case (it looks nicer in the URL for the website) and to always start each "chapter" (session or any file you want as a page on the website) with a single # header. You don't need to use the YAML header.

Slides are a bit trickier. Let me know if or how you want to use them and I can help out with that.

In the _quarto.yml file is a list of files you can add to put into the website. I'l make direct comments on them in the PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is what auto-builds the website and puts it online. You don't need to touch it or change it at all.

Comment on lines +15 to +24
chapters:
- index.qmd
- part: "Preamble"
- part: "Sessions"
chapters:
- sessions/welcome.qmd
- sessions/motivation.qmd
- sessions/traditional-mediation-analysis.qmd
appendices:
- appendix/welcome.qmd
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is where you add the files you want put onto the website. Unfortunately, you can't put slide files here. But we deal with that when you get to it.

I didn't put anything into part: "Preamble" because your precourse.qmd file was in one of the _files/ folders, which I moved in #2, so that needs to be merged first before you can add it correctly here.

@@ -0,0 +1,140 @@
# Motivation
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each "chapter" (or page on the website) must start with and only contain one # top level header. All other ones are ## or more.

@lwjohnst86
Copy link
Member Author

@arborzhang the website is live at https://steno-aarhus.github.io/IDEG-mediation-course/ 🎉

@lwjohnst86 lwjohnst86 requested a review from arborzhang March 3, 2025 09:13
@lwjohnst86
Copy link
Member Author

@arborzhang I'll merge this in now, but please review my comments to get an understanding of what I've added and why :)

@lwjohnst86 lwjohnst86 merged commit c085888 into main Mar 4, 2025
@lwjohnst86 lwjohnst86 deleted the build/add-quarto-website-build-files branch March 4, 2025 16:30
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