View Source Serum.Build (serum_md v1.6.2)

A module for managing the overall project build procedure.

Summary

Functions

Builds the given Serum project.

Functions

@spec build(Serum.Project.t()) :: Serum.Result.t(binary())

Builds the given Serum project.

Build Procedure

  1. Tries to load plugins and a theme.

  2. Checks if the system timezone is properly set.

    Timex requires the local timezone information to format the date/time string. If it's not set or invalid, Timex will fail.

  3. Checks if the current user has enough permission on the destination directory and cleans it if it already exists.

  4. Loads source files. See Serum.Build.FileLoader.

  5. Processes source files and produces intermediate data structures. See Serum.Build.FileProcessor.

  6. Generates HTML fragments from the intermediate data. See Serum.Build.FragmentGenerator.

  7. Renders full HTML pages from fragments and writes them to files. See Serum.Build.FileEmitter.

  8. Copies assets/ and media/ directories if they exist.