Blog ==== Fast public pages, comments, an editor with live preview, an RSS feed and a JSON API. .. code-block:: text blog/ ├── app.py # composition root ├── settings.py # DATABASE_URL, BLOG_NAME ├── models/ # database.py, account.py, post.py, comment.py ├── services/ # blog.py (BlogService), seed.py └── views/ ├── components/ # markup.py (slugify + safe Markdown subset), shell, post_list, comments, editor ├── pages/ # public.py, admin.py, feed.py (/feed.xml, a FastAPI router) └── styles/ 1. Rich text that is safe by construction ----------------------------------------- .. literalinclude:: ../../examples/blog/views/components/markup.py :pyobject: render_body The body becomes headings, lists and paragraphs, built from *nodes*, not HTML strings. Every piece of text is escaped, so a post containing ``