module

Hwaro::Content::Seo::JsonLd

Instance methods

all_tags(page : Models::Page, config : Models::Config) : String

Generate both Article + BreadcrumbList + extended type JSON-LD

Source
article(page : Models::Page, config : Models::Config, site : Models::Site | Nil = nil) : String

Generate Article JSON-LD for a page

Source
collection_page(page : Models::Page, config : Models::Config, url_override : String | Nil = nil) : String

Generate CollectionPage JSON-LD for listing pages (section indexes, taxonomy index/term pages, author term pages). These are collections, not articles, so they use schema.org CollectionPage with a name instead of Article/headline, keeping JSON-LD consistent with the og:type="website" emitted on the same page (gh#522 follow-up).

Source
faq_page(page : Models::Page, config : Models::Config) : String

Generate FAQPage JSON-LD from page extra field "faq" Front matter format: schema_type = "FAQ" [[extra.faq]] question = "What is Hwaro?" answer = "A static site generator."

Source
for_page(page : Models::Page, config : Models::Config) : String

Auto-detect and generate schema based on page.extra["schema_type"]

Source
how_to(page : Models::Page, config : Models::Config) : String

Generate HowTo JSON-LD from page extra field "howto_steps" Front matter format: schema_type = "HowTo" [[extra.howto_steps]] name = "Step 1" text = "Do this first."

Source
organization(config : Models::Config, logo : String | Nil = nil) : String

Generate Organization JSON-LD from site config

Source
person(name : String, config : Models::Config, url : String | Nil = nil, image : String | Nil = nil) : String

Generate Person JSON-LD from author info

Source
website(config : Models::Config) : String

Generate WebSite JSON-LD with optional SearchAction (sitelinks search box)

Source