{{- /* Returns true when a page should be described as an article - by Open Graph's og:type and article:* tags, and by head/schema-article.html. An article lives in a content section. Standalone top-level pages - contact, privacy policy, a thank-you page - are regular pages, and describing them as articles is metadata that does not match the content. Set `schemaArticle` in front matter to force it either way. One partial rather than the same condition in two templates, so og:type and the Article schema can never disagree about what a page is. */ -}} {{- /* An author's own page lives in a section too, but it describes a person rather than a piece of writing, so it is a ProfilePage and not an Article. See head/is-author-page.html and head/schema-profile-page.html. `schemaArticle` still overrides this either way. */ -}} {{- $isArticle := and (ne .Section "") (not (partial "head/is-author-page.html" .)) -}} {{- if isset .Params "schemaarticle" -}} {{- $isArticle = .Params.schemaarticle -}} {{- end -}} {{- return (and .IsPage $isArticle) -}}