Skip to content

Commit 4a90da4

Browse files
jeremymanningclaude
andcommitted
Auto-generate week subtitles from parsed lecture titles
Replace hardcoded weekDescriptions map with dynamic generation from the actual parsed lecture titles. This keeps subtitles permanently in sync with slides/README.md content. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d0b66a5 commit 4a90da4

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

index.html

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -940,23 +940,13 @@ <h1>Models of Language and Communication</h1>
940940
courseData.push(currentWeek);
941941
}
942942

943-
// Week descriptions from syllabus (Topics column)
944-
const weekDescriptions = {
945-
1: 'Introduction, Pattern Matching, ELIZA',
946-
2: 'Data Cleaning, Tokenization, POS Tagging',
947-
3: 'Classic Embeddings (LSA, LDA), Word Embeddings',
948-
4: 'Contextual Embeddings, Dimensionality Reduction',
949-
5: 'Attention Mechanisms, Transformer Architecture',
950-
6: 'BERT Deep Dive, Encoder Models',
951-
7: 'GPT Architecture, Scaling Up',
952-
8: 'No classes (instructor away)',
953-
9: 'RAG, Mixture of Experts, Ethics',
954-
10: 'Final Project Presentations'
955-
};
956-
957-
// Apply week descriptions from syllabus
943+
// Auto-generate week subtitles from parsed lecture titles
958944
courseData.forEach(week => {
959-
week.subtitle = weekDescriptions[week.number] || '';
945+
if (week.lectures.length > 0) {
946+
week.subtitle = week.lectures.map(l => l.title).join(', ');
947+
} else if (week.noClassNotice) {
948+
week.subtitle = 'No classes (instructor away)';
949+
}
960950
});
961951

962952
return courseData;

0 commit comments

Comments
 (0)