diff --git a/community/hooks.py b/community/hooks.py index 0836b34c..2bfcd60f 100644 --- a/community/hooks.py +++ b/community/hooks.py @@ -127,3 +127,7 @@ scheduler_events = { # # auto_cancel_exempted_doctypes = ["Auto Repeat"] +website_route_rules = [ + {"from_route": "/courses/", "to_route": "courses/course"}, + {"from_route": "/courses//", "to_route": "courses/topic"}, +] diff --git a/community/www/courses/course.html b/community/www/courses/course.html index e4190705..f592bff9 100644 --- a/community/www/courses/course.html +++ b/community/www/courses/course.html @@ -43,7 +43,7 @@
{% for topic in course.topics %}
-
{{topic.title}}
+
{{topic.title}}
{{topic.preview | markdown }}
{% endfor %} diff --git a/community/www/courses/macros/card.html b/community/www/courses/macros/card.html index 49b3ffff..16c53193 100644 --- a/community/www/courses/macros/card.html +++ b/community/www/courses/macros/card.html @@ -1,9 +1,9 @@ {% macro course_card(course) %}
-
{{course.title}}
+
{{course.title}}

{{ frappe.utils.md_to_html(course.description[:250]) }}

- See more → + See more →
{% endmacro %} @@ -11,7 +11,7 @@ {% macro topic_card(course, topic) %}
-
{{topic.title}}
+
{{topic.title}}

{{topic.description}}

diff --git a/community/www/courses/topic.html b/community/www/courses/topic.html index 4d632bc0..ceef444d 100644 --- a/community/www/courses/topic.html +++ b/community/www/courses/topic.html @@ -24,7 +24,7 @@