You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of manually creating the links to the lectures contained in one course, it would be possible to automatically create those links calling the frontmatter variable course assigned to the lectures when they are added to a course.
Problem: with this method, we lose the option of deciding in which order we should display the lectures contained in one course
course_text.append('\n***Lectures contained in this course:***\n')
course_text.append('<ul class="post-list">\n')
course_text.append('{% assign lectures = site.posts | where: "categories","lecture" %}\n')
course_text.append('{% for lecture in lectures %}\n')
course_text.append('{% if lecture.course contains page.title%}\n')
course_text.append('<p><a href="{{ lecture.url | relative_url }}">{{ lecture.title | escape }} </a></p>\n')
course_text.append('{% endif %}{% endfor %}</ul>')
The text was updated successfully, but these errors were encountered:
An extension of this would be to write a liquid script which auto-generates a course page containing the list of lectures contained within that course from the course: x frontmatter tag.
Then, the only task for the Python script would be to add the course tag to the front matter
Instead of manually creating the links to the lectures contained in one course, it would be possible to automatically create those links calling the frontmatter variable
course
assigned to the lectures when they are added to a course.Problem: with this method, we lose the option of deciding in which order we should display the lectures contained in one course
The text was updated successfully, but these errors were encountered: