Creating Course Files

< >

Creating Course Files

In this lesson, we’ll walk through the process of creating the necessary files for your course, including the course overview and individual lesson files.

Creating the Course Overview File

  1. Navigate to your project directory
  2. Create a new course using the Hugo command:
hugo new courses/<kebab-style-course-name>/_index.md
  1. Open the _index.md file and fill in the frontmatter:
---
title: "Your Course Title"
description: "A brief description of your course"
summary: "A summary of the course content"
type: "courses"
layout: "course"
date: YYYY-MM-DD
lastUpdated: "Month YYYY"
tags: ["tag1", "tag2", "tag3"]
levels: "beginner/intermediate/advanced"
video:
  youtube: YOUR_VIDEO_ID              # YouTube video ID (recommended)
  # vimeo: 123456789                  # or Vimeo video ID
  # tibav: 42061                      # or TIB AV-Portal ID
image: course-thumbnail.png           # image from _media/ folder
duration: "X hours"
lessonCount: X
firstLessonURL: "/en/courses/your-course-name/lesson1/"
featured: true/false
certificate: true/false
objectives:
  - "Objective 1"
  - "Objective 2"
prerequisites:
  - "Prerequisite 1"
  - "Prerequisite 2"
programmingLanguages:
  - "Language 1"
  - "Language 2"
instructors:
  - name: "Your Name"
    role: "Your Role"
    avatar: "/images/placeholders/avatar.svg"
---

# Course content goes here

Creating Lesson Files

Create lessons as individual Markdown files:

hugo new courses/<kebab-style-course-name>/<prefix>-<kebab-style-lesson-name>.md

Open each lesson file and fill in the frontmatter:

---
title: "Lesson Title"
description: "Brief description of the lesson"
type: "courses"
course: "your-course-name"
layout: "lesson"
lessonNumber: X
courseSection: "Course Section Name"
duration: "X minutes"
image: getting-started/lesson-thumbnail.png  # image from _media/ subfolder
video:
  youtube: YOUR_VIDEO_ID              # YouTube video ID (recommended)
  # vimeo: 123456789                  # or Vimeo video ID
---

# Lesson content goes here

Organizing Your Files

Ensure your files are organized according to the recommended structure:

content/
└── en/
    └── courses/
        └── your-course-name/
            ├── _index.md
            ├── _media/
            │   ├── index.md
            │   ├── course-thumbnail.png
            │   └── getting-started/
            │       └── lesson-thumbnail.png
            ├── 10-getting-started/
            │   ├── _index.md
            │   ├── 10-introduction.md
            │   └── 20-getting-started.md
            ├── 20-advanced-topics/
            │   ├── _index.md
            │   └── 10-advanced-topic.md
            └── ...

Exercise: Create Your Course Files

  1. Create the course overview file for your planned course
  2. Create at least three lesson files, following the naming convention
  3. Fill in the frontmatter for each file with appropriate information

In the next lesson, we’ll focus on writing effective course content using Markdown.