Goal: have a personal blog, and try out another point in the 'modular app design with elixir' space. Designing OTP systems with elixir had some interesting ideas.
19 lines
569 B
Elixir
19 lines
569 B
Elixir
defmodule FirehoseWeb.PageHTML do
|
|
@moduledoc """
|
|
This module contains pages rendered by PageController.
|
|
|
|
See the `page_html` directory for all templates available.
|
|
"""
|
|
use FirehoseWeb, :html
|
|
|
|
embed_templates "page_html/*"
|
|
|
|
defp blog_label(%{blog: :engineering}), do: "Engineering"
|
|
defp blog_label(%{blog: :release_notes}), do: "Releases"
|
|
defp blog_label(_), do: "Blog"
|
|
|
|
defp post_base_path(%{blog: :engineering}), do: "/blog/engineering"
|
|
defp post_base_path(%{blog: :release_notes}), do: "/blog/releases"
|
|
defp post_base_path(_), do: "/blog"
|
|
end
|