Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-17 11:33:26 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-18 00:20:12 +0300
commit81975f847dc19c21c2321207645807771db97fab (patch)
tree6658282e788f305d5c3a6c55692921ff317732f5 /docs
parent8103188b9b9e8eeb3bcb53c8b64e2b83397e82ae (diff)
Fix Resource.ResourceType so it always returns MIME's main type
The one exception being for the Page, which does not have a MIME type, in which you will get the value `page`. Fixes #8052
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/content-management/page-resources.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/content/en/content-management/page-resources.md b/docs/content/en/content-management/page-resources.md
index 75c40ce6e..bdc73a7c3 100644
--- a/docs/content/en/content-management/page-resources.md
+++ b/docs/content/en/content-management/page-resources.md
@@ -21,7 +21,9 @@ the lowest page they are bundled with, and simple which names does not contain `
## Properties
ResourceType
-: The main type of the resource. For example, a file of MIME type `image/jpeg` has the ResourceType `image`.
+: The main type of the resource's [Media Type](/templates/output-formats/#media-types). For example, a file of MIME type `image/jpeg` has the ResourceType `image`. A `Page` will have `ResourceType` with value `page`.
+
+{{< new-in "0.80.0" >}} Note that we in Hugo `v0.80.0` fixed a bug where non-image resources (e.g. video) would return the MIME sub type, e.g. `json`.
Name
: Default value is the filename (relative to the owning page). Can be set in front matter.