How to Modify the Curriculum Lesson Order and Groupings in ML-For-Beginners

You modify the curriculum lesson order and groupings by editing the _data/curriculum.yml file, which defines modules, their group assignments, and the sequential array of lessons that Jekyll uses to generate the site navigation.

The microsoft/ML-For-Beginners repository uses a data-driven approach to curriculum management. Instead of hardcoding navigation links, the Jekyll-based site generator reads a central YAML configuration to determine how lessons are ordered and grouped. This architecture makes it straightforward to modify the curriculum lesson order and groupings without touching the lesson content itself.

Understanding the Curriculum Data Structure

The entire curriculum structure is defined in _data/curriculum.yml. This file contains a top-level list of modules; each module has a title, an optional description, a group name, and a lessons array that enumerates the lesson files in the exact order they should appear.

Jekyll consumes this file to create navigation menus, the table-of-contents, and the “Next/Previous” lesson buttons. Changing the sequence or grouping requires editing only this single data source.

How to Change Lesson Order

To reorder lessons within a module, rearrange the items in the lessons array. The array order determines the display sequence and navigation flow.

Reordering Lessons Within a Module

Suppose you want to swap the first two lessons in the Regression module. Edit the lessons list in _data/curriculum.yml:

modules:
  - title: "Regression"
    group: "Supervised Learning"
    lessons:
      - module-3/02-linear-regression.md      # moved to first position

      - module-3/01-intro-to-regression.md   # moved to second position

      - module-3/03-polynomial-regression.md

File paths are relative to the repository root (e.g., module-1/01-introduction.md). Ensure the filenames match existing lesson files under module-X/ directories.

How to Modify Module Groupings

The group field inside each module determines the logical clustering used by the sidebar. Changing this string moves the module to a different group or creates a new one.

Moving Modules Between Groups

To move the Clustering module from "Supervised Learning" to "Unsupervised Learning", update the group value:

modules:
  - title: "Classification"
    group: "Supervised Learning"
    lessons:
      - module-4/01-intro-to-classification.md
      - module-4/02-decision-trees.md

  - title: "Clustering"
    group: "Unsupervised Learning"    # changed from "Supervised Learning"

    lessons:
      - module-5/01-intro-to-clustering.md

The sidebar will automatically regenerate to reflect the new grouping when the site rebuilds.

Adding New Lessons to the Curriculum

To insert a new lesson, first create the markdown file in the appropriate module-X/ directory, then append or insert its path into the lessons array.

modules:
  - title: "Deep Learning"
    group: "Neural Networks"
    lessons:
      - module-6/01-intro-to-deep-learning.md
      - module-6/02-building-your-first-model.md   # newly created file

      - module-6/03-model-evaluation.md

Critical requirements:

  • The file must exist at the specified path before the site builds
  • Use consistent 2-space indentation; YAML is whitespace-sensitive
  • Paths must be relative to the repository root

Key Files and Build Process

File Purpose
_data/curriculum.yml Central definition of modules, groups, and lesson order
module-X/*.md Individual lesson content referenced by the curriculum file
_config.yml Jekyll configuration; generally unchanged when reordering lessons
README.md High-level overview mentioning curriculum structure

When you push changes to the main branch, GitHub Pages automatically rebuilds the site using the updated curriculum.yml. No additional Jekyll restarts or configuration changes are required.

Summary

  • The curriculum structure is controlled entirely by _data/curriculum.yml, which defines modules, their group assignments, and lesson sequences.
  • To modify lesson order, rearrange the items in the lessons array within each module; the array order dictates the navigation flow.
  • To change groupings, edit the group field in the module definition; the sidebar automatically clusters modules by this value.
  • Ensure YAML indentation uses two spaces per level and that all file paths in the lessons array match actual markdown files in the repository.

Frequently Asked Questions

What file controls the curriculum structure?

The _data/curriculum.yml file controls the entire curriculum structure. This YAML document lists all modules, assigns them to logical groups, and enumerates the lesson files in their display order. Jekyll reads this file to generate the navigation sidebar and the next/previous lesson links.

Do I need to restart Jekyll after editing curriculum.yml?

No. When using GitHub Pages, pushing your changes to the main branch triggers an automatic site rebuild. Jekyll regenerates the navigation from the updated _data/curriculum.yml without requiring manual restarts or local server refreshes. If running Jekyll locally, save the file and the site will auto-regenerate if using jekyll serve.

How do I create a new module group?

To create a new module group, assign a new string value to the group field in any module definition within _data/curriculum.yml. The sidebar will automatically create a new collapsible section using that group name. For example, changing group: "Supervised Learning" to group: "Advanced Topics" moves that module to a newly labeled group.

Can I have lessons from different modules in the same group?

Yes. The group field is defined per module, not per lesson, so all lessons within a single module share the same group assignment. However, you can assign the same group name to multiple modules. This allows you to cluster related modules (and all their lessons) under a single sidebar heading while maintaining separate lesson sequences within each module.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →