Skip to content

Enhancement: Allow for file or media field type #308

@landure

Description

@landure

I'm using Hugo as a content generator. Hugo allow for audio and videos front matter fields for populating the corresponding opengraph values (see Configure Open Graph).

According to Hugo documentation:

audio and videos are URL arrays like images for the audio and video metadata tags, respectively.

The audio and videos fields definition should be:

				// an array of paths to audio files related to the page;
				// used by the opengraph internal template to populate og:audio.
				{
					"title": "Audio",
					"name": "audio",
					"type": "file",
					"multiple": true
				},
				// an array of paths to videos files related to the page;
				// used by the opengraph internal template to populate og:video.
				{
					"title": "Videos",
					"name": "v					ideos",
					"type": "file",
					"multiple": true
				}

with the file type working like the image type for any file type.

Additionally, a mime type or file extension filter for selected files should be possible:

				{
					"title": "Audio",
					"name": "audio",
					"type": "file",
					"multiple": true,
					allowed-mime-type: [ "audio/*", "audio/mp3" ],
					allowed-extensions: [ "mp3", "m4a", "wav", "flac" ],
				},

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions