A function component for rendering a single blog post.
Import and use it in any template:
import PhoenixBlog.Web.Components.BlogPost
<.blog_post post={@post} blog_path="/blog" />Attributes
post(required) - A%PhoenixBlog.Post{}structblog_path- Path to blog index for back/tag links (default: "/blog")show_back_link- Show "Back to blog" link (default: true)show_header- Show post header with title, tags, author, date (default: true)show_featured_image- Show featured image (default: true)show_tags_footer- Show tags section at bottom (default: true)class- CSS classes for the wrapper article element
Summary
Functions
Attributes
post(:map) (required)blog_path(:string) - Defaults to"/blog".show_back_link(:boolean) - Defaults totrue.show_header(:boolean) - Defaults totrue.show_featured_image(:boolean) - Defaults totrue.show_tags_footer(:boolean) - Defaults totrue.like_count(:integer) - Defaults tonil.liked(:boolean) - Defaults tofalse.current_user(:any) - Defaults tonil.class(:string) - Defaults tonil.
Slots
inner_block