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 media type (formerly known as a MIME type) of the resource (e.g., image/jpeg).
The main type of the resource’s media type (e.g., image).
The subtype of the resource’s type (e.g., jpeg). This may or may not correspond to the file suffix.
A slice of possible file suffixes for the resource’s media type (e.g., [jpg jpeg jpe jif jfif]).
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.