FeaturedImageSchema
extends
BlogPostSchema
in
Front matter schema interfaces are used by various Hyde components to specify what data they provide or contain. They also serve as a convenient way to see the supported front matter properties.
Tags
Table of Contents
Constants
- BLOG_POST_SCHEMA = ['title' => 'string', 'description' => 'string', 'category' => 'string', 'date' => 'string', 'author' => ['string', \Hyde\Markdown\Contracts\FrontMatter\SubSchemas\AuthorSchema::AUTHOR_SCHEMA], 'image' => ['string', \Hyde\Markdown\Contracts\FrontMatter\SubSchemas\FeaturedImageSchema::FEATURED_IMAGE_SCHEMA]]
- FEATURED_IMAGE_SCHEMA = [ 'source' => 'string', // Name of a file in _media/ or a remote URL (required) 'altText' => 'string', // The alt text (important for accessibility) // todo: Support alt, description 'titleText' => 'string', // The title text (hover tooltip & metadata) // todo: Support title, caption 'licenseName' => 'string', // The name of the license (e.g. "CC BY 4.0") 'licenseUrl' => 'string', // The URL of the license (e.g. "https://creativecommons.org/licenses/by/4.0/") 'authorName' => 'string', // The name of the author/photographer of the image (e.g. "John Doe", Wikimedia Commons) 'authorUrl' => 'string', // The URL of the author/photographer of the image (e.g. "https://commons.wikimedia.org/wiki/User:John_Doe", Wikimedia Commons) 'copyright' => 'string', ]
- PAGE_SCHEMA = [ 'title' => 'string', 'description' => 'string', // For <meta name='description'> values. It is used by the automatic page metadata generator, which reads this value from the front matter. 'canonicalUrl' => 'string', // While not present in the page data as a property, it is used by the accessor method, which reads this value from the front matter. 'navigation' => \Hyde\Markdown\Contracts\FrontMatter\SubSchemas\NavigationSchema::NAVIGATION_SCHEMA, ]
Constants
BLOG_POST_SCHEMA
public
mixed
BLOG_POST_SCHEMA
= ['title' => 'string', 'description' => 'string', 'category' => 'string', 'date' => 'string', 'author' => ['string', \Hyde\Markdown\Contracts\FrontMatter\SubSchemas\AuthorSchema::AUTHOR_SCHEMA], 'image' => ['string', \Hyde\Markdown\Contracts\FrontMatter\SubSchemas\FeaturedImageSchema::FEATURED_IMAGE_SCHEMA]]
FEATURED_IMAGE_SCHEMA
public
mixed
FEATURED_IMAGE_SCHEMA
= [
'source' => 'string',
// Name of a file in _media/ or a remote URL (required)
'altText' => 'string',
// The alt text (important for accessibility) // todo: Support alt, description
'titleText' => 'string',
// The title text (hover tooltip & metadata) // todo: Support title, caption
'licenseName' => 'string',
// The name of the license (e.g. "CC BY 4.0")
'licenseUrl' => 'string',
// The URL of the license (e.g. "https://creativecommons.org/licenses/by/4.0/")
'authorName' => 'string',
// The name of the author/photographer of the image (e.g. "John Doe", Wikimedia Commons)
'authorUrl' => 'string',
// The URL of the author/photographer of the image (e.g. "https://commons.wikimedia.org/wiki/User:John_Doe", Wikimedia Commons)
'copyright' => 'string',
]
PAGE_SCHEMA
public
mixed
PAGE_SCHEMA
= [
'title' => 'string',
'description' => 'string',
// For <meta name='description'> values. It is used by the automatic page metadata generator, which reads this value from the front matter.
'canonicalUrl' => 'string',
// While not present in the page data as a property, it is used by the accessor method, which reads this value from the front matter.
'navigation' => \Hyde\Markdown\Contracts\FrontMatter\SubSchemas\NavigationSchema::NAVIGATION_SCHEMA,
]