index : pandoc | |
Hex package with a file-watcher and Mix task for using Pandoc to convert Markdown files to HTML. |
aboutsummaryrefslogtreecommitdiff |
diff options
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 |