{# 
  This template defines the folder structure for a chapter.
  - It contains subfolders for assignments, lessons, and materials.
  - It also creates a file named notes.md.
  - The variable `lessons` is expected to be a list of lesson objects (each rendered via the lesson template).
  - **Important:** Do not remove or modify child_folder_name as it specifies the default subfolder for lessons.
  Define once here in the template. Do not remove child_folder_name since it defaults to the lessons subfolder. 
  "default_chapter.j2":
  We only prefix if `numeric_prefix` is defined and not empty.
#}
{% set child_folder_name = "lessons" %}
{
  "folder": "{% if numeric_prefix %}{{ numeric_prefix }}_{% endif %}{{ chapter_name }}",
  "subfolders": [
    { "folder": "assignments" },
    {
      "folder": "lessons",
      "subfolders": [
        {% for lesson in lessons %}
          {{ lesson | tojson }},
        {% endfor %}
        {}
      ]
    },
    { "folder": "materials" }
  ],
  "files": [
    { "file": "notes.md" }
  ]
}
