Work with markdown content system, MarkdownContent models, and cotton components in markdown. Use when working with content models or adding markdown components.
Use this Skill when:
These models extend MarkdownContent and have a content TextField:
freedom_ls/content_engine/models.py# In Python
html = topic.rendered_content()
# In templates (already marked safe)
{{ topic.rendered_content }}
What happens:
MARKDOWN_ALLOWED_TAGS allowed)Location: freedom_ls/content_engine/templates/cotton/
Available: callout.html, youtube.html, picture.html, content-link.html
Usage:
<c-callout level="info" title="Note">Content here</c-callout>
<c-youtube video_id="abc123"></c-youtube>
<c-picture src="images/file.svg" alt="Alt text"></c-picture>
<c-content-link path="other.md">link</c-content-link>
freedom_ls/content_engine/templates/cotton/<name>.htmlconfig/settings_base.py:
MARKDOWN_ALLOWED_TAGS = {
"c-name": {"attr1", "attr2"},
}
<c-name attr1="value"></c-name>calculate_path_from_root(){% markdown text %} renders standalone markdown