Skip to content

Commit

Permalink
Add use of variables to replace hard-coded department, number, semest…
Browse files Browse the repository at this point in the history
…er info.
  • Loading branch information
paciorek committed Dec 19, 2024
1 parent c68f788 commit 21648d6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ For instructors: please see [these instructions in the section below](https://gi

2. Begin making changes relevant to your course. To edit a file, you can click on a file, then on the edit icon in the upper right and then on `Commit changes` in the upper right when you want to save your changes. In the dialog box that pops up, also simply click on `Commit changes` in the box.
- If desired, modify the site's metadata and table of contents in `_quarto.yml` to reflect the pages you want on the site. You may choose to add or remove files (each file having the conent for a separate page).
- Edit the various Quarto Markdown (qmd) files: `index.qmd` (the home page), `staff.qmd` (information on staff), and `syllabus.qmd` with the content you want. You can use simple Markdown formatting, which will hopefully be easy to do by example even if you're not familiar with Markdown. Also modify the generic course title, department and number (currently "Dept 999" and the like).
- Edit the various Quarto Markdown (qmd) files: `index.qmd` (the home page), `staff.qmd` (information on staff), and `syllabus.qmd` with the content you want. You can use simple Markdown formatting, which will hopefully be easy to do by example even if you're not familiar with Markdown.
- Edit `_variables.yml` to replace the generic department, number, and semester information with the actual information for your course.
- Edit the `buttons.yml` file to modify the buttons shown at the top of the home page (or remove the syntax related to buttons in `index.qmd` if you don't want buttons).
- Update `README.md` to remove these instructions and include basic text referring to your actual class number (see section at bottom of this document for template text).
- Check the license assigned to the materials posted on the site (by default CC-BY) in `license.qmd` to make sure you are comfortable with it. You're welcome to choose another license that you prefer. If you'd like to not allow commercial use, you might choose CC-BY-NC. You might also consider not allowing derivative works, for example by choosing [CC-BY-ND](https://creativecommons.org/licenses/by-nd/4.0/deed.en) or CC-BY-NC-ND, as chosen for Data 8, but note that this license can make it hard for others to use the material in part or to build upon it.
Expand Down
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project:
website:
sidebar:
style: docked
title: "Dept 999"
title: "{{< var department_abbrev >}} {{< var number >}}"
logo: assets/stat_bear.png
logo-alt: "UC Berkeley Statistics logo"
contents:
Expand Down
5 changes: 5 additions & 0 deletions _variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
department: "Department"
department_abbrev: "Dept"
number: "999"
name: "Generic Class"
semester: "Spring 2025"
4 changes: 2 additions & 2 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Department 999: Generic Class"
subtitle: "UC Berkeley, Spring 2024"
title: "{{< var department >}} {{< var number >}}: {{< var name >}}"
subtitle: "UC Berkeley, {{< var semester >}}"
listing:
- id: buttons
template: assets/buttons.ejs
Expand Down
4 changes: 2 additions & 2 deletions syllabus.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ title: "Syllabus"

Jump to:

- [About Dept 999](#about)
- [About {{< var department >}} {{< var number >}}](#about)
- [Goals](#goals)
- [Prerequisites](#prerequisites)


## About Dept 999
## About {{< var department >}} {{< var number >}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus lectus dui, euismod vel tellus sit amet, maximus fringilla risus. Cras nec maximus leo. Fusce sit amet tortor pellentesque, hendrerit odio vitae, dictum lorem. Nunc sed nunc nisl. Cras augue tortor, ultrices ut luctus non, dictum nec magna. Cras vel ex purus. In blandit est non finibus dignissim. Donec vehicula, nisi quis rutrum faucibus, est turpis ultrices nibh, quis rutrum diam nibh tempus nulla. Vestibulum malesuada consectetur ex in vestibulum.

Expand Down

0 comments on commit 21648d6

Please sign in to comment.