defmodule JOL.Blog do alias JOL.Blog.Post use NimblePublisher, build: Post, from: Application.app_dir(:jol, "priv/posts/**/*.md"), as: :posts @posts Enum.sort_by(@posts, & &1.date, {:desc, Date}) @tags @posts |> Enum.flat_map(& &1.tags) |> Enum.uniq() |> Enum.sort() @spec posts() :: [] def posts, do: @posts @spec unique_tag_list() :: [] def unique_tag_list, do: @tags end