Skip to content
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

Where video files must be? #9

Closed
carpajr opened this issue Apr 13, 2020 · 3 comments
Closed

Where video files must be? #9

carpajr opened this issue Apr 13, 2020 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@carpajr
Copy link

carpajr commented Apr 13, 2020

Hello Martignoni,

Maybe it is a silly question. I'm using Hugo for a few days, and I've installed the plugin that you have made.

I tried to put a video inside public/images, public/media, static/media, and variations, and I always have the same result:

Building sites... ERROR 2020/04/12 23:55:40 No file with filename "media/conan_1" found.

At content/posts/my-post.md I put:
{{< video src="media/conan_1" loop="true" >}}

The file name is conan_1.mp4 (Conan is related to conan.io)

How is the correct way to assign videos? Could you help me?

Thank you for the plugin.

@martignoni
Copy link
Owner

You should place it in the page bundle, as the shortcode uses Hugo Page Resources.

@martignoni martignoni self-assigned this Apr 13, 2020
@martignoni martignoni added the question Further information is requested label Apr 13, 2020
@carpajr
Copy link
Author

carpajr commented Apr 13, 2020

I was able to use hugo-video after see how page bundle works
Thank you very much.

@jpfleischer
Copy link

jpfleischer commented Nov 15, 2023

for those who may still be confused after reading the page bundle, I encountered this issue when trying to put a bunch of pages in one directory.

i was trying to make a header page with a bunch of subpages. the solution was to move a subpage markdown file to its own directory, name it index.md, and put the video in that directory.
something like

content/en/docs/
├── python/
│   ├── _index.md # this is just a page that shows links to other pages here, since python serves as a sort of category
│   ├── function-writing.md
│   ├── class-creation.md
│   ├── pip-install.md
│   └── my-video.mp4

so I wanted class-creation.md to play a video, but this wasn't working since it wasn't named index.md. i decided to create its own subdir in python/ and move class-creation.md to that subdir, and name it index.md, and move the video there with it. then it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants