diff --git a/blog/migrations/0003_post_description.py b/blog/migrations/0003_post_description.py
new file mode 100644
index 0000000..1d12e7e
--- /dev/null
+++ b/blog/migrations/0003_post_description.py
@@ -0,0 +1,18 @@
+# Generated by Django 6.0 on 2025-12-15 20:13
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('blog', '0002_post_enable'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='post',
+ name='description',
+ field=models.TextField(default='Courte description'),
+ ),
+ ]
diff --git a/blog/models.py b/blog/models.py
index a2cfaca..387d847 100644
--- a/blog/models.py
+++ b/blog/models.py
@@ -4,6 +4,7 @@ class Post(models.Model):
name = models.CharField(max_length=200)
tags = models.CharField(max_length=200)
slug = models.SlugField()
+ description = models.TextField(default="Courte description")
content = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
diff --git a/courses/templatetags/comment_format.py b/courses/templatetags/comment_format.py
index 2fbfd7e..64ea248 100644
--- a/courses/templatetags/comment_format.py
+++ b/courses/templatetags/comment_format.py
@@ -27,6 +27,19 @@ def _format_inline(text: str) -> str:
lambda m: f"{m.group(1)}",
text,
)
+ # H1
+ text = re.sub(r"^# (.+)$", r"
{{ post.content|striptags|truncatewords:26 }}
+{{ post.description|comment_markdown|truncatewords:26 }}