scriptorium/builder

The builder contains convenience functions to interface with the different parts of scriptorium, using the configuration to control what is done.

Types

Something failed when building the blog.

pub type BuildError {
  ParseError(err: config.ParseError)
  WriteError(err: config.WriteError)
}

Constructors

  • ParseError(err: config.ParseError)
  • WriteError(err: config.WriteError)

Functions

pub fn compile(
  db: Database,
  config: Configuration,
) -> CompileDatabase

Compile the post and page content into HTML strings.

pub fn parse(
  config: Configuration,
) -> Result(Database, BuildError)

Parse the blog’s input files.

pub fn render(
  db: Database,
  compiled: CompileDatabase,
  config: Configuration,
) -> RenderDatabase

Render the content into HTML pages.

pub fn write(
  posts: RenderDatabase,
  config: Configuration,
) -> Result(Nil, BuildError)

Write the render database into files.

Search Document