SEO.JSONLD.FAQ (SEO v0.3.0-rc.0)

View Source

Helper for building a Schema.org FAQPage JSON-LD structure.

Takes a list of question/answer pairs and wraps them in the correct Schema.org format.

Example

SEO.JSONLD.FAQ.build([
  %{question: "What is Elixir?", answer: "A functional programming language."},
  %{question: "What is Phoenix?", answer: "A web framework for Elixir."}
])

Summary

Functions

Build a FAQPage JSON-LD map from a list of question/answer pairs.

Functions

build(qa_pairs)

@spec build([map() | Keyword.t()]) :: map()

Build a FAQPage JSON-LD map from a list of question/answer pairs.

Each item in the list should be a map or keyword list with :question and :answer keys.