View Source Tableau.Page behaviour (tableau v0.17.1)

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.

Types

@type assigns() :: map()
@type template() :: any()

Callbacks

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

The page template.