Static asset (mp4) moved in the wrong folder building website. can someone help me?

i’m creating a web tv generator. i’m using the standard tinyce-hugo-theme-master theme with a custom tag added in the single.html

i put videos in


and so on.

using a python script,

i generate a .md file for every videos with two custom keyword (videosrc and videoposter) and i bind those custom keyword on the template assuming relative path starting from the same folder so, for example ,

this is the tree of my /content

├───Cetto Laqualunque
├───Ingegner Cane
├───Sensualita A Corte
└───Tassista di notte

and the template has this video tag

As i said, the script search for every video file and create the relative .md content so for example for Tassista.m4v i obtain

Description = "Tassista"
Title = "Tassista"
videoposter = "Tassista.jpg"
videosrc = “Tassista.m4v”

Now, when i compile the website,

Started building site
0 draft content
0 future content
1 pages created
2 non-page files copied
0 paginator pages created
0 tags created
0 categories created
in 109 ms

the video is moved in the wrong folder as you can see opening

in fact, this is the “tree” output of the folder

├───Tassista di notte
│ Tassista.m4v

│ index.html
│ index.xml


so, the questions are,

why the folder “Tassista di notte” is generated? why the file isn’t moved in the right folder, “tassista-di-notte”, where the html file is? Due Hugo move the static asset for me, i think there is something wrong with some script.

thanks a lot.

i also tried to remove empty spaces in my /content folder renaming

“tassista di notte” to “tassista-di-notte”

now hugo move the video in the “list” folder and not in the “page” folder


├───Cetto Laqualunque
├───Ingegner Cane
├───Sensualita A Corte


│ index.html
│ index.xml
│ Tassista.m4v


Tassista.m4v should to be in Tassista subfolder due index.html of Tassista has this html video tag

A static file, like mp4, is typically placed in the /static/ folder whereas the /content/ folder is for the written content files (like markdown).

See source organisation for an overview.

I don’t understand the second part of this sentence and have a hard time differentiating between those different foreign words since they all seem so similar to me, but for the first part:

to put the m4v file in the /tassista/ subfolder (relative to root) when rendering the website, put it in /static/tassista/ and it will render at

1 Like

thanks :slightly_smiling:
i read


how should i build the relative path to the subfolder? due i put videos on


i need to point to subfolders based on content path but there is something wrong with something like a url encode of the / character

my template now is

<video style="width:100%" src="{{ .Site.BaseURL }}{{ .File.Dir }}{{ .Params.videosrc }}" poster="{{ .Site.BaseURL }}{{ .File.Dir }}{{ .Params.videoposter}}" controls autoplay></video>

but browser are searching for


and not


how can i solve this problem?


i solved using .Section

  <video style="width:100%" src="{{ .Site.BaseURL }}{{.Section}}/{{ .Params.videosrc }}" poster="{{ .Site.BaseURL }}{{.Section}}/{{ .Params.videoposter}}" controls autoplay>