Content Creation

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"
videoSrc: /videos/courses/your-course-name/intro-video.webm
image: "/images/courses/your-course-image.png"
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

  1. For each lesson in your course, create a new file:
hugo new courses/<kebab-style-course-name>/<prefix>-<kebab-style-lesson-name>.md
  1. 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: /images/courses/lesson-image.png
videoSrc: /videos/courses/your-course-name/lesson-video.webm
---

# 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
            ├── 010-010-introduction.md
            ├── 010-020-getting-started.md
            ├── 020-010-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.