Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
path: root/lib/mix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mix')
-rw-r--r--lib/mix/tasks/pandoc.ex16
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