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/pandoc.ex')
-rw-r--r-- | lib/pandoc.ex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pandoc.ex b/lib/pandoc.ex index 882d772..9002bb5 100644 --- a/lib/pandoc.ex +++ b/lib/pandoc.ex @@ -3,7 +3,11 @@ defmodule Pandoc do Documentation for `Pandoc`. """ - def run(profile, ["--watch" | dirs]) do + def run(profile, ["--watch" | _]) do + config = Application.get_env(:pandoc, profile) + opts = [cd: config[:cd] || File.cwd!()] + dirs = [opts[:cd], Path.join(opts[:cd], "_drafts")] + ref = __MODULE__.Supervisor |> Supervisor.start_child( |