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

Use static as source for videos? #19

Open
kniec opened this issue Nov 30, 2020 · 4 comments
Open

Use static as source for videos? #19

kniec opened this issue Nov 30, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@kniec
Copy link

kniec commented Nov 30, 2020

Thanks for the theme, love to include videos before I can put them on youtube.
Only think is that I would like to put the videos into static/ next to the content folder so that I separate the static content from the actual markdown content.

From #9 I figure that I can not use a path like /movies/my-video.mp4 where movies is placed in static?

@martignoni
Copy link
Owner

Yes, this component currently only looks for files inside page bundles, so your example path doesn't work.

But this could be indeed a useful enhancement:

  • First try to find the video in the page bundle
  • If nothing found look for it in static media library

Is that what you mean?

@kniec
Copy link
Author

kniec commented Nov 30, 2020

How about assuming a relative path to be relative to the page bundle and an absolute path to be underneath /static?
Like {{< video src="myvideo.mp4" >}} expect the file to be in the same page bundle versus {{< video src="/movies/myvideo.mp4" >}} expects the file to be at static/movies/myvideo.mp4

@martignoni martignoni self-assigned this Nov 30, 2020
@martignoni martignoni added the enhancement New feature or request label Nov 30, 2020
@martignoni
Copy link
Owner

martignoni commented Nov 30, 2020

Good suggestion! If you've a PR, I'd be glad to accept it.

@martignoni
Copy link
Owner

How about assuming a relative path to be relative to the page bundle and an absolute path to be underneath /static?

AFAIK, it's impossible to list (and match) files inside static folder. This is only possible in assets folder with resources.Get. See Hugo doc.

So I'm afraid there's no point to doing this :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants