streamlining use of Home73k app config functions
This commit is contained in:
parent
5e47a243b8
commit
a4249392f3
2 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue