serum v1.0.0 Serum.Build.FileProcessor
Processes the input files to produce the intermediate data.
Link to this section Summary
Functions
Processes the input files.
Link to this section Types
Link to this type
result()
result()
result() :: %{
pages: [Serum.Page.t()],
posts: [Serum.Post.t()],
lists: [Serum.PostList.t()],
templates: map(),
includes: map()
}
result() :: %{ pages: [Serum.Page.t()], posts: [Serum.Post.t()], lists: [Serum.PostList.t()], templates: map(), includes: map() }
Link to this section Functions
Link to this function
process_files(files, proj)
process_files(files, proj)
process_files(Serum.Build.FileLoader.result(), Serum.Project.t()) ::
Serum.Result.t(result())
process_files(Serum.Build.FileLoader.result(), Serum.Project.t()) :: Serum.Result.t(result())
Processes the input files.
Procedure
- Compiles includable templates.
- Compiles regular templates. Any call to the
include/1
macro in a template will be expanded into the corresponding includable template by theSerum.Template.Compiler
module. - Processes page files.
- Processes blog post files.
- Generates post lists using information generated just before. A list of tags and their use counts is also created.
- Updates the
Serum.GlobalBindings
agent so that the above information is available later, when rendering pages into fragments or full HTML pages.
Link to this function
update_global_bindings(compact_pages, compact_posts, tag_counts)
update_global_bindings(compact_pages, compact_posts, tag_counts)
update_global_bindings([map()], [map()], [{Serum.Tag.t(), integer()}]) :: :ok
update_global_bindings([map()], [map()], [{Serum.Tag.t(), integer()}]) :: :ok