defmodule Web.PostHTML do
  use Web, :html

  embed_templates "post_html/*"

  def blog_path(%Schema.Post{} = blog) do
    if date = Core.Posts.publish_date(blog) do
      ~p"/blog/#{date.year}/#{date.month}/#{date.day}/#{blog.slug}"
    end
  end
end