StaticBlog.Template.Components (StaticBlog v0.2.0)

Copy Markdown View Source

Shared Phoenix.Component templates: the site layout, masthead, footer, and theme toggle used by the default template implementation.

Summary

Functions

Root HTML layout. Renders <!doctype html>, the <head>, masthead, the inner block content, and the footer.

Functions

layout(assigns)

Root HTML layout. Renders <!doctype html>, the <head>, masthead, the inner block content, and the footer.

Attributes

  • :title is the document title.

  • :description is the meta description.

  • :canonical is the canonical URL for the current page.

  • :site is the site configuration keyword list.

  • :page_kind is either :index or :post, used to toggle the <h1> treatment in the masthead.

Attributes

  • title (:string) (required)
  • description (:string) (required)
  • canonical (:string) (required)
  • site (:any) (required)
  • page_kind (:atom) - Defaults to :post.
  • og_type (:string) - Defaults to "website".
  • og_image (:string) - Defaults to nil.
  • published_at (:any) - Defaults to nil.
  • updated_at (:any) - Defaults to nil.
  • article_author (:string) - Defaults to nil.
  • article_tags (:list) - Defaults to [].
  • structured_data (:list) - Defaults to [].

Slots

  • inner_block (required)