gleebook/template

Types

pub type InitError {
  AlreadyExists(path: String)
  WriteFailed(path: String, reason: simplifile.FileError)
}

Constructors

  • AlreadyExists(path: String)

    A SUMMARY.md is already there; we never overwrite an existing book.

  • WriteFailed(path: String, reason: simplifile.FileError)

Values

pub fn files() -> List(#(String, String))

Every file in the template, as #(path relative to the book root, contents).

pub fn scaffold(root: String) -> Result(List(String), InitError)

Write the starter book into root (normally “book”). Returns the paths that were written, in order.

Search Document