From 80e993f638b0ec549afb8ed3ad1007d74898d36d Mon Sep 17 00:00:00 2001 From: Christopher Paciorek Date: Thu, 19 Dec 2024 13:43:40 -0800 Subject: [PATCH] Add use of variables to replace hard-coded department, number, semester info. --- _quarto.yml | 2 +- _variables.yml | 6 +++++- index.qmd | 4 ++-- syllabus.qmd | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 26fb9ca..3f82460 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -5,7 +5,7 @@ website: site-url: https://berkeley-cdss.github.io/course-site-quarto/ sidebar: style: docked - title: "Dept 999" + title: "{{< var department-abbrev >}} {{< var number >}}" logo: assets/stat_bear.png logo-alt: "UC Berkeley Statistics logo" tools: diff --git a/_variables.yml b/_variables.yml index 4038f16..ab5e2dd 100644 --- a/_variables.yml +++ b/_variables.yml @@ -1 +1,5 @@ -site-url: https://berkeley-cdss.github.io/course-site-quarto/ +department: Department +department-abbrev: Dept +number: 999 +name: Generic Class +semester: Spring 2025 diff --git a/index.qmd b/index.qmd index e692db3..721c6c8 100644 --- a/index.qmd +++ b/index.qmd @@ -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: schedule template: _extensions/qmd-lab/course-website-ejs/schedule-badge/schedule.ejs diff --git a/syllabus.qmd b/syllabus.qmd index d42158b..e3c3c58 100644 --- a/syllabus.qmd +++ b/syllabus.qmd @@ -6,12 +6,12 @@ title: "Syllabus" Jump to: -- [About Department 999](#about-department-999) +- [About {{< var department >}} {{< var number >}}](#about) - [Goals](#goals) - [Prerequisites](#prerequisites) -## About Department 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.