From a4249392f357b90856eb3b0af38c2bb6b6f9b8bc Mon Sep 17 00:00:00 2001 From: Adam Piontek Date: Tue, 6 Apr 2021 18:13:17 -0400 Subject: [PATCH] streamlining use of Home73k app config functions --- lib/home73k/blog.ex | 5 +++-- lib/home73k/highlighter.ex | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/home73k/blog.ex b/lib/home73k/blog.ex index 6e9f0a4..649bc94 100644 --- a/lib/home73k/blog.ex +++ b/lib/home73k/blog.ex @@ -1,9 +1,10 @@ defmodule Home73k.Blog do + import Home73k, only: [app_blog_content: 0] alias Home73k.Blog.Post Application.ensure_all_started(:earmark) - post_paths = "#{Home73k.app_blog_content()}/**/*.md" |> Path.wildcard() + post_paths = "#{app_blog_content()}/**/*.md" |> Path.wildcard() post_paths_hash = :erlang.md5(post_paths) posts = @@ -13,7 +14,7 @@ defmodule Home73k.Blog do end def __mix_recompile__?() do - Path.wildcard("#{Home73k.app_blog_content()}/**/*.md") + Path.wildcard("#{app_blog_content()}/**/*.md") |> :erlang.md5() != unquote(post_paths_hash) end diff --git a/lib/home73k/highlighter.ex b/lib/home73k/highlighter.ex index 31bb7b7..a528057 100644 --- a/lib/home73k/highlighter.ex +++ b/lib/home73k/highlighter.ex @@ -3,9 +3,10 @@ defmodule Home73k.Highlighter do Performs code highlighting. """ + import Home73k, only: [app_chroma_bin: 0] alias Home73k.Temp - @chroma_bin Home73k.app_chroma_bin() |> Path.expand() + @chroma_bin app_chroma_bin() |> Path.expand() @doc """ Highlights all code in HTML (fenced code blocks and inlined code)