tale/renderer

Types

Pagination type

pub type PaginationInfo {
  PaginationInfo(
    current_page: Int,
    total_pages: Int,
    per_page: Int,
    previous: option.Option(String),
    next: option.Option(String),
  )
}

Constructors

  • PaginationInfo(
      current_page: Int,
      total_pages: Int,
      per_page: Int,
      previous: option.Option(String),
      next: option.Option(String),
    )
pub type RenderJob {
  RenderJob(
    page: content.PageData,
    posts: List(content.PageData),
    pagination: option.Option(PaginationInfo),
    current_tag: option.Option(TagContext),
    site_tags: List(TagContext),
  )
}

Constructors

Tag Context type

pub type TagContext {
  TagContext(
    name: String,
    slug: String,
    permalink: String,
    posts: List(content.PageData),
  )
}

Constructors

  • TagContext(
      name: String,
      slug: String,
      permalink: String,
      posts: List(content.PageData),
    )

Values

pub fn load_partials(
  partials_dir: String,
) -> Result(List(#(String, handles.Template)), String)

Loading template partials

pub fn render_jobs(
  jobs: List(RenderJob),
  config: config.SiteConfig,
  partials: List(#(String, handles.Template)),
  layouts_dir: String,
) -> Result(List(String), String)
Search Document