# `PhoenixBlog.Web.Components.BlogPost`
[🔗](https://github.com/lalabuy948/phoenix_blog/blob/v0.1.7/lib/phoenix_blog/web/components/blog_post.ex#L1)

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{}` struct
  * `blog_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

# `blog_post`

## Attributes

* `post` (`:map`) (required)
* `blog_path` (`:string`) - Defaults to `"/blog"`.
* `show_back_link` (`:boolean`) - Defaults to `true`.
* `show_header` (`:boolean`) - Defaults to `true`.
* `show_featured_image` (`:boolean`) - Defaults to `true`.
* `show_tags_footer` (`:boolean`) - Defaults to `true`.
* `like_count` (`:integer`) - Defaults to `nil`.
* `liked` (`:boolean`) - Defaults to `false`.
* `current_user` (`:any`) - Defaults to `nil`.
* `class` (`:string`) - Defaults to `nil`.
## Slots

* `inner_block`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
