HUGO
Menu
GitHub 86433 stars Mastodon

Colors

RESOURCE.Colors

Applicable to images, returns a slice of the most dominant colors using a simple histogram method.

Content

RESOURCE.Content

Returns the content of the given resource.

Crop

RESOURCE.Crop SPECIFICATION

Applicable to images, returns a new image resource cropped according to the given processing specification.

Data

RESOURCE.Data

Applicable to resources returned by the resources.GetRemote function, returns information from the HTTP response.

Err

RESOURCE.Err

Applicable to resources returned by the resources.GetRemote function, returns an error message if the HTTP request fails, else nil.

Exif

RESOURCE.Exif

Applicable to JPEG, PNG, TIFF, and WebP images, returns an object containing Exif metadata.

Fill

RESOURCE.Fill SPECIFICATION

Applicable to images, returns a new image resource cropped and resized according to the given processing specification.

Filter

RESOURCE.Filter FILTER...

Applicable to images, applies one or more image filters to the given image resource.

Fit

RESOURCE.Fit SPECIFICATION

Applicable to images, returns a new image resource downscaled to fit according to the given processing specification.

Height

RESOURCE.Height

Applicable to images, returns the height of the given resource.

MediaType

RESOURCE.MediaType

Returns a media type object for the given resource.

Meta

RESOURCE.Meta

Applicable to JPEG, PNG, TIFF, and WebP images, returns an object containing Exif, IPTC, and XMP metadata.

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

Publishes the given resource and returns its permalink.

Process

RESOURCE.Process SPECIFICATION

Applicable to images, returns a new image resource processed according to the given processing specification.

Publish

RESOURCE.Publish

Publishes the given resource.

RelPermalink

RESOURCE.RelPermalink

Publishes the given resource and returns its relative permalink.

Resize

RESOURCE.Resize SPECIFICATION

Applicable to images, 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

Applicable to images, returns the width of the given resource.