Packages

obelisk is a static site generator for Elixir. It is inspired by jekyll, with the goal of being fast and simple to use and extend.

Current section

Files

Jump to
obelisk lib obelisk tasks post.ex
Raw

lib/obelisk/tasks/post.ex

defmodule Obelisk.Tasks.Post do
@moduledoc """
This task creates a new post with the given post title argument as part of the filename,
and included in the front matter title
## Arguments
* Post title
## Usage
$ mix obelisk post "This one wierd trick"
"""
@doc """
Run the build task
"""
def run([]) do
raise ArgumentError, message: "Cannot create a new post without the post name"
end
@doc """
Run the build task
"""
def run(args) do
hd(args) |> Obelisk.Post.create
end
end