Follow these steps to add a new course to the LearnQt site:
-
Update
_config.yml: Add the course URL to the_config.ymlfile. This ensures the course link is accessible globally.# Course Links newcoursekey: 'https://www.udemy.com/course/your-new-course-url/?couponCode='
-
Add the Course to
_data/learning_paths.yml: Add the course details to the appropriate learning path in_data/learning_paths.yml. This ensures the course is displayed in the learning paths section.learning_paths: - title: "Your Learning Path Title" description: "Description of the learning path" outcome: "Outcome of the learning path" path_id: "your-learning-path-id" courses: - title: "Your New Course Title" subtitle: "Your course subtitle/description" tag: "[Latest/Recommended]" # Optional url_key: "newcoursekey" # Must match the key from _config.yml
-
Update
_data/courses.yml: If the course needs to appear in the featured courses section, add it to_data/courses.yml.best_courses_list: - title: "Your New Course Title" subtitle: "Your course subtitle" image: "/assets/courses/image/your_course_thumbnail.png" link: "{{ site.newcoursekey }}" level: "Beginner/Intermediate/Advanced" rating: "4.5" reviews: "100"
-
Add Course Thumbnail: Save the course thumbnail image in
assets/courses/image. Name it consistently, e.g.,your_course_thumbnail.png. -
Verify
_pages/coursespromo.md: The_pages/coursespromo.mdfile dynamically pulls data from_data/learning_paths.yml. Ensure the new course is correctly added to the learning path, as the file uses the following loop:{% for path in site.data.learning_paths.learning_paths %} {% for course in path.courses %} <li class="mb-3"> <div class="d-flex align-items-start"> <span style="color: #15ba29;" class="me-2">✓</span> <div> <strong>{{ course.title }}</strong> {% if course.tag %} <span class="badge ms-2" style="background-color: #15ba29;">{{ course.tag }}</span> {% endif %} <br> <small class="text-muted">{{ course.subtitle }}</small> </div> </div> </li> {% endfor %} {% endfor %}No changes are needed in
_pages/coursespromo.mdunless you want to customize the layout. -
Test Your Changes: Run the site locally to verify the new course appears correctly on both
/courses/and/udemy-discounted-9/.bundle exec jekyll serveCheck:
- Ensure all YAML files are properly indented.
- Verify the
url_keymatches the key in_config.yml. - Check that the thumbnail image is correctly placed and referenced.