serum v1.0.0 Serum.Build.FileLoader
A module responsible for loading project files.
Link to this section Summary
Functions
Loads project files.
Link to this section Types
Link to this type
result()
result()
result() :: %{
templates: [Serum.File.t()],
includes: [Serum.File.t()],
pages: [Serum.File.t()],
posts: [Serum.File.t()]
}
result() :: %{ templates: [Serum.File.t()], includes: [Serum.File.t()], pages: [Serum.File.t()], posts: [Serum.File.t()] }
Link to this section Functions
Link to this function
load_files(src)
load_files(src)
load_files(binary()) :: Serum.Result.t(result())
load_files(binary()) :: Serum.Result.t(result())
Loads project files.
Files will be read from four subdirectories:
templates/
: Template files (*.html.eex
)includes/
: Includable template files (*.html.eex
)pages/
: Pages (*.md
,*.html
,*.html.eex
)posts/
: Blog posts (*.md
)
The includes/
directory and the posts/
directory are optional. That is,
this function won't fail even if they don't exist. The corresponding lists
in the resulting map will be empty.