-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Add teach dashboard subcommand to generate and manage dynamic website dashboard content for Quarto teaching sites. This enables client-side JavaScript to display current week, topic, deadlines, and announcements without requiring site rebuilds.
Motivation
Currently, the STAT 545 course website dashboard requires manual editing of index.qmd and _variables.yml to update weekly content. Since GitHub Pages only serves static files, we've implemented a client-side JavaScript solution that reads from semester-data.json. This feature request adds flow-cli commands to manage that JSON file.
Key Value Proposition: Eliminate weekly manual dashboard updates. Students always see accurate "This Week" content. Announcements auto-expire. Week numbers auto-calculate.
Proposed Commands
teach dashboard # Show help
teach dashboard generate # Generate semester-data.json from teach-config.yml
teach dashboard generate --force # Overwrite existing JSON
teach dashboard preview # Preview current week based on date
teach dashboard preview --week 5 # Preview specific week
teach dashboard announce # Interactive announcement wizard
teach dashboard announce "Title" "Message" --expires DATE --type note
teach dashboard status # Show dashboard config statusExtended teach-config.yml Schema
Add new optional fields to semester_info.weeks:
semester_info:
start_date: "2026-01-19"
end_date: "2026-05-16"
timezone: "America/Denver" # NEW
weeks:
- number: 1
topic: "Fundamentals of Experimental Design"
focus: "Introduction to randomization..." # NEW (optional)
lecture: # NEW (optional)
title: "Introduction to Design Principles"
url: "lectures/week-01_intro-design_part1.qmd"
lab: # NEW (optional)
title: "Getting Started with R & Quarto"
url: "r_help.qmd"
assignment: # NEW (optional)
title: "Assignment 1"
url: "assignments/assignment1.qmd"
due: "2026-01-29"
breaks:
- name: "Spring Break"
start: "2026-03-15"
end: "2026-03-22"
show_next: true # NEW (default: true)
dashboard:
fallback_message: "Check the Syllabus for current week information."
announcements:
- id: "welcome-2026"
type: "note"
title: "Welcome to Class!"
date: "2026-01-13"
content: "Please review the Syllabus..."
link: "syllabus/syllabus-final.qmd"
expires: "2026-01-26"Output: semester-data.json
Generated at .flow/semester-data.json (copied to _site/ by Quarto):
{
"semester": "Spring 2026",
"timezone": "America/Denver",
"start_date": "2026-01-19",
"end_date": "2026-05-16",
"fallback_message": "Check the Syllabus...",
"weeks": [...],
"breaks": [...],
"announcements": [...]
}Implementation Notes
- Depends on existing
teach-config.ymlandteach-dates.zsh - Should auto-run
teach dashboard generateafterteach dates sync(configurable) - Preview output should use ASCII boxes for terminal display
- Announcement IDs auto-generated if not specified
Related
- Spec:
docs/specs/SPEC-teach-dashboard-2026-01-18.md - Client-side implementation already done in STAT 545 website (
stat545.js) - Reference: STAT 545
semester-data.jsonfor expected output format
Effort Estimate
~8-12 hours across 4 phases:
- Core generate command (3-4h)
- Preview command (2-3h)
- Announce command (2-3h)
- Documentation & tests (1-2h)