2024-02-16 16:09:35 -05:00
|
|
|
defmodule SloaneSH do
|
|
|
|
@moduledoc """
|
2024-02-16 16:07:16 -05:00
|
|
|
Sloane's personal static site generator powering [sloane.sh](https://sloane.sh).
|
2024-02-16 16:09:35 -05:00
|
|
|
"""
|
2024-02-16 17:05:28 -05:00
|
|
|
|
2024-02-16 22:28:13 -05:00
|
|
|
alias SloaneSH.Build
|
|
|
|
alias SloaneSH.Context
|
2024-02-17 08:09:30 -05:00
|
|
|
alias SloaneSH.Serve
|
|
|
|
alias SloaneSH.Watch
|
2024-02-16 22:28:13 -05:00
|
|
|
|
2024-02-16 17:05:28 -05:00
|
|
|
def build(_opts \\ []) do
|
2024-02-16 22:28:13 -05:00
|
|
|
context()
|
|
|
|
|> Build.run()
|
|
|
|
|
2024-02-16 17:05:28 -05:00
|
|
|
:ok
|
|
|
|
end
|
|
|
|
|
|
|
|
def watch(_opts \\ []) do
|
2024-02-16 22:28:13 -05:00
|
|
|
context()
|
|
|
|
|> Watch.start_link()
|
|
|
|
end
|
|
|
|
|
2024-02-17 08:09:30 -05:00
|
|
|
def serve do
|
|
|
|
context()
|
|
|
|
|> Serve.start_link()
|
|
|
|
end
|
|
|
|
|
2024-02-16 22:28:13 -05:00
|
|
|
def context do
|
|
|
|
Context.new()
|
2024-02-16 17:05:28 -05:00
|
|
|
end
|
2024-02-16 16:09:35 -05:00
|
|
|
end
|