View Source GriffinSSGOld (Griffin v0.2.0)

This is the documentation for the Griffin project.

By default, Griffin will scan for content in the priv/content directory and output generated files to the _site directory.

Griffin depends on the following libraries:

  • Plug - a specification and conveniences for composable modules in between web applications

Link to this section Summary

Functions

Compiles a template file from disk into quoted code that can then be used by GriffinSSG.render/3.

Reads a file from disk and returns the parsed frontmatter metadata and the file contents.

Renders a layout to file, taking in a number of options that affect the rendered output.

Link to this section Functions

Link to this function

compile_layout(path, options \\ [])

View Source

Compiles a template file from disk into quoted code that can then be used by GriffinSSG.render/3.

Link to this function

parse_file(path, options \\ [])

View Source

Reads a file from disk and returns the parsed frontmatter metadata and the file contents.

Link to this function

render(path, layout, options)

View Source

Renders a layout to file, taking in a number of options that affect the rendered output.

The following options are accepted:

  • frontmatter - the frontmatter attributes
  • content - the content to render in the layout
  • assigns - a map with template variables to be used in the layout