serum v1.0.0 Serum.Build.FileProcessor

Processes the input files to produce the intermediate data.

Link to this section Summary

Link to this section Types

Link to this type

result()
result() :: %{
  pages: [Serum.Page.t()],
  posts: [Serum.Post.t()],
  lists: [Serum.PostList.t()],
  templates: map(),
  includes: map()
}

Link to this section Functions

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 the Serum.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([map()], [map()], [{Serum.Tag.t(), integer()}]) :: :ok