Page resources are only accessible from page bundles, those directories with index.md or
_index.md files at their root. Page resources are only available to the
page with which they are bundled.
In this example, first-post is a page bundle with access to 10 page resources including audio, data, documents, images, and video. Although second-post is also a page bundle, it has no page resources and is unable to directly access the page resources associated with first-post.
The MIME type of the resource, such as image/jpeg.
The main type of the resource’s MIME type. For example, a file of MIME type application/pdf has for MainType application.
The subtype of the resource’s MIME type. For example, a file of MIME type application/pdf has for SubType pdf. Note that this is not the same as the file extension - PowerPoint files have a subtype of vnd.mspowerpoint.
A slice of possible suffixes for the resource’s MIME type.
Returns the page resources of the given type.
Returns all the page resources (as a slice) whose Name matches the given Glob pattern (examples). The matching is case-insensitive.
Same as Match but will return the first match.
// Using Match/GetMatch to find this images/sunset.jpg ?
Page Resources Metadata
The page resources’ metadata is managed from the corresponding page’s front matter with an array/table parameter named resources. You can batch assign values using wildcards.