SimpleBlog.Converter.Page (simple_blog v0.2.0)

Module responsible for convert pages from eex to html

Summary

Functions

Convert eex file to html

Functions

Link to this function

exx_to_html(arg, posts)

Convert eex file to html

Examples

iex> posts = [%SimpleBlog.Post{title: "post 1"}, %SimpleBlog.Post{title: "post 2"}]
iex> SimpleBlog.Converter.Page.exx_to_html({:ok, "<%= for post <- posts do %><%= post.title %><% end %>"}, posts)
"post 1post 2"

iex> post = %SimpleBlog.Post{title: "post 1"}
iex> SimpleBlog.Converter.Page.exx_to_html({:ok, "<%= post.title %>"}, post)
"post 1"