<p>It looks like this is all happening in Craft's template folder, where anything with an underscore—like your _layout directory and its contents—won't be accessible via URL.</p>

<p>You'll definitely want to adjust your project layout to keep Craft's templates together in /craft/templates, and any front-end resources (like your videojs.thumbnails.js, thumbnails.png, etc.) in the /public folder.</p>

<p>The <a href="https://craftcms.com/docs/routing" rel="nofollow noreferrer">Routing documentation</a> fully explains what Craft does with any front-end URL it gets—it's a tad intense but should fully explain what happens with a request.</p>

CC BY-SA 3.0
2017-03-30T02:09:07.573Z
2017-03-30T02:32:33.447Z
2017-03-30T02:32:33.447Z
Matt Stein
<p>I'm trying to include the videojs.thumbnails.js file in my layout.html:</p>

<pre><code>&lt;script src="./videojs.thumbnails.js"&gt;&lt;/script&gt;
</code></pre>

<p>It's located at the same level.</p>

<p><a href="https://i.sstatic.net/csbK8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/csbK8.png" alt="enter image description here"></a></p>

<p>I am getting the following error: <a href="http://localhost:3000/videojs.thumbnails.js" rel="nofollow noreferrer">http://localhost:3000/videojs.thumbnails.js</a> 404 (Not Found)</p>

<p>Any ideas what I am missing?</p>

<templating><frontend>
Can't include relative JS file from layout
# Can't include relative JS file from layout

(Asked by: username_0 on 2017-03-30)

I'm trying to include the videojs.thumbnails.js file in my layout.html:


It's located at the same level.

I am getting the following error: http://localhost:3000/videojs.thumbnails.js 404 (Not Found)
Any ideas what I am missing?

**Tags:** templating, frontend


---

## 1 answers

### Answer by username_1 on 2017-03-30. Score: 3 | Accepted answer

It looks like this is all happening in Craft's template folder, where anything with an underscore—like your \_layout directory and its contents—won't be accessible via URL.

You'll definitely want to adjust your project layout to keep Craft's templates together in /craft/templates, and any front-end resources (like your videojs.thumbnails.js, thumbnails.png, etc.) in the /public folder.

The [Routing documentation](https://craftcms.com/docs/routing) fully explains what Craft does with any front-end URL it gets—it's a tad intense but should fully explain what happens with a request.


---

