index : pandoc | |
Hex package with a file-watcher and Mix task for using Pandoc to convert Markdown files to HTML. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-12-05 10:02:11 -0800 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-12-05 10:02:11 -0800 |
commit | d9dd7e8cadebf41581d341aac3ce2b647bd7ad0a (patch) | |
tree | 6da8b55b532d7710250103056a1f213b5f63839a /lib/mix/tasks | |
parent | d90365c58497274f65cd0c7b05606029bd756065 (diff) |
Move watcher into a submodule; add mix task
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r-- | lib/mix/tasks/pandoc.ex | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/mix/tasks/pandoc.ex b/lib/mix/tasks/pandoc.ex new file mode 100644 index 0000000..fe93208 --- /dev/null +++ b/lib/mix/tasks/pandoc.ex @@ -0,0 +1,16 @@ +defmodule Mix.Tasks.Pandoc do + use Mix.Task + + @out_dir "priv/static" + + @impl true + def run([profile | _args]) do + IO.puts "profile: #{profile}" + + "priv/posts" + |> File.ls!() + |> Enum.each(fn path -> + Pandoc.install_and_run(Path.join(["priv", "posts", path])) + end) + end +end |