API Reference Griffin v#0.2.0

View Source

Modules

Griffin is a Static Site Generator.

Helper functions for handling basic file operations

Module for non-named GenServer responsible for watching for changes. Executes a generic callback when file changes are detected. Used for the LiveReload HTTPServer that is launched as part of mix grf.server.

Module responsible for compiling layouts. Stores compiled layouts in an ETS table. Supports nested layouts with a maximum nesting depth of 10.

Bandit WebSocket handler for live reload. Watches the output directory and pushes a message to the browser when files change so the page reloads. Spawned from GriffinSSG.Web.Plug during mix grf.server.

Defines a simple HTTP server with live reload. Spawned from the grf.server task. Serves the generated static site from the output directory and injects a small live-reload client script into HTML responses. The client connects to a Bandit WebSocket (GriffinSSG.Web.LiveReload) that pushes reload events when the output directory changes.

Mix Tasks

Generates a static website from template and layout files.

Generates a new Markdown page with relevant front matter attributes.

Starts up a local development server using Bandit. The local server watches for file changes and re-runs grf.build on file change, then live-reloads the page in the browser. This server is NOT meant to be run in production.