mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 14:16:29 +00:00
Add MediaType docs
This commit is contained in:
1 parent
f3ca6209ad
commit
6e88506708
1 file changed
+12
@@ -31,6 +31,18 @@ Permalink
|
|||||||
RelPermalink
|
RelPermalink
|
||||||
: The relative URL to the resource. Resources of type `page` will have no value.
|
: The relative URL to the resource. Resources of type `page` will have no value.
|
||||||
|
|
||||||
|
MediaType
|
||||||
|
: The MIME type of the resource, such as `image/jpg`.
|
||||||
|
|
||||||
|
MediaType.MainType
|
||||||
|
: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`.
|
||||||
|
|
||||||
|
MediaType.SubType
|
||||||
|
: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension - PowerPoint files have a subtype of `vnd.mspowerpoint`.
|
||||||
|
|
||||||
|
MediaType.Suffixes
|
||||||
|
: A slice of possible suffixes for the resource's MIME type.
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
ByType
|
ByType
|
||||||
: Returns the page resources of the given type.
|
: Returns the page resources of the given type.
|
||||||
|
|||||||
Reference in new issue
Block a user