- move pre-gen files out of public/
This commit is contained in:
Raymonzut
2020-11-07 11:43:14 +01:00
parent 403fc9d5cb
commit eff86a1f3e
8 changed files with 4 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
posts/*
+3 -3
View File
@@ -48,13 +48,13 @@ index_file = post_contents
|> (fn v -> %{index: v} end).()
|> fill_template_pretemplated.(index_template).()
File.open!("./gen/index.html", [:write])
File.open!("./public/gen/index.html", [:write])
|> IO.binwrite(index_file)
|> File.close()
post_contents
|> Enum.each(fn post ->
File.open!("./gen/" <> Map.get(post, :id) <> ".html", [:write])
File.open!("./public/gen/" <> Map.get(post, :id) <> ".html", [:write])
|> IO.binwrite(fill_template.(post_template, post))
|> File.close()
end)
@@ -67,6 +67,6 @@ post_feed = post_contents
|> (fn v -> %{items: v} end).()
|> fill_template_pretemplated.(post_feed_template).()
File.open!("./gen/rss.xml", [:write])
File.open!("./public/gen/rss.xml", [:write])
|> IO.binwrite(post_feed)
|> File.close()
-1
View File
@@ -1,2 +1 @@
posts/*
gen/*