HUGO
Menu
GitHub 89803 stars Mastodon

Colors

RESOURCE.Colors

Returns a slice of an image's most dominant colors, ordered from most to least dominant, using a simple histogram method.

Content

RESOURCE.Content

Returns the content of the given resource.

Crop

RESOURCE.Crop SPECIFICATION

Returns a new image resource cropped according to the given processing specification.

Data

RESOURCE.Data

Returns supplemental information about resources produced by the resources.GetRemote, css.Build, and js.Build functions.

Err

RESOURCE.Err

Returns an error message if the HTTP request for a remote resource fails, else nil.

Exif

RESOURCE.Exif

Returns an object containing Exif metadata for supported image formats.

Fill

RESOURCE.Fill SPECIFICATION

Returns a new image resource cropped and resized according to the given processing specification.

Filter

RESOURCE.Filter FILTER...

Returns a new image resource with one or more image filters applied.

Fit

RESOURCE.Fit SPECIFICATION

Returns a new image resource downscaled to fit according to the given processing specification.

Height

RESOURCE.Height

Returns the height of the given image resource.

MediaType

RESOURCE.MediaType

Returns a media type object for the given resource.

Meta

RESOURCE.Meta

Returns an image's Exif, IPTC, and XMP metadata, if the format supports it.

Name

RESOURCE.Name

Returns the name of the given resource as optionally defined in front matter, falling back to its file path.

Params

RESOURCE.Params

Returns a map of resource parameters as defined in front matter.

Permalink

RESOURCE.Permalink

Returns the permalink of the given resource, publishing it in the process.

Process

RESOURCE.Process SPECIFICATION

Returns a new image resource processed according to the given processing specification.

Publish

RESOURCE.Publish

Publishes the given resource.

RelPermalink

RESOURCE.RelPermalink

Returns the relative permalink of the given resource, publishing it in the process.

Resize

RESOURCE.Resize SPECIFICATION

Returns a new image resource resized according to the given processing specification.

ResourceType

RESOURCE.ResourceType

Returns the main type of the given resource's media type.

Title

RESOURCE.Title

Returns the title of the given resource as optionally defined in front matter, falling back to a relative path or hashed file name depending on resource type.

Width

RESOURCE.Width

Returns the width of the given image resource.