Tableau.Page behaviour (tableau v0.24.0)

View Source

A tableau page.

A page is a basic unit of a static site.

defmodule MySite.HomePage do
  use Tableau.Page,
    layout: MySite.RootLayout,
    permalink: "/"

  def template(assigns) do
    """
    <h1>My Site</h1>

    <p>
      Welcome to my site!
    </p>
    """
  end
end

Summary

Callbacks

The page template.

Functions

The page struct allows you to create pages as data structures and manually insert them into the Graph.

Types

assigns()

@type assigns() :: map()

template()

@type template() :: any()

Callbacks

template(assigns)

@callback template(assigns()) :: template()

The page template.

Functions

%Tableau.Page{}

(struct)

The page struct allows you to create pages as data structures and manually insert them into the Graph.