-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Resources.ByType "video" return empty result #8052
Comments
This is a request for a new method i.e. |
Thanks for your supplement, I thought it was a bug before😝 |
See also #7671. This would also be desirable when taking #7893 into account: Before removing third party services Hugo should provide some sort of feature symmetry, that means providing some basic functionality to replace external services, this would also require a HTML / IFrame shortcode. This would also make a nice Christmas present: Hugo 0.80 "Video Edition" ;) |
@cmahnke Meanwhile, you can use this: https://github.com/martignoni/hugo-video. Not so nice Christmas present, but still :-) |
There is a special case in there for images ... not sure why I put that in there, I must have thought about the generic application/text types not being very useful. But the documentation is clear, so we need to fix this. |
Thanks for the incoming fix! And another strange bug (I think) is videos can be accessed by methods like Btw, only |
The above is certainly not related to this particular issue. |
The one exception being for the Page, which does not have a MIME type, in which you will get the value `page`. Fixes gohugoio#8052
The one exception being for the Page, which does not have a MIME type, in which you will get the value `page`. Fixes gohugoio#8052
The one exception being for the Page, which does not have a MIME type, in which you will get the value `page`. Fixes #8052
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
Description
I want to access video files by
.Resources.ByType "video"
, but the result is empty. I also look at mediaType.go, which shows that.mp4
and.webm
is supported.After more tests, I found that video can be accessed by using its suffix. For example, I can access
1.mp4
by.Resources.ByType "mp4"
, and access1.webm
by.Resources.ByType "webm"
. But none of these can be accessed by.Resources.ByType "video"
.But for images, I can use
.Resources.ByType "image"
to access it instead of.Resources.ByType "png"
, which is totally contradictory to videos.I was suggested to open an issue for this in hugo community.
See also https://discourse.gohugo.io/t/resources-bytype-video-return-empty/29975
The text was updated successfully, but these errors were encountered: