<p>Generally speaking, Craft doesn't care where those files live, but I generally put all assets like CSS/SCSS, JS, etc in my <code>craft/templates</code> folder. If you're using <code>gulp</code> then you would compile your files out to the <code>public</code> folder and link to them appropriately. If you're not compiling those, then they would need to live in the <code>public</code> folder.</p>

<p>You can read more about templating here:</p>

<p><a href="https://craftcms.com/docs/templating-overview" rel="nofollow noreferrer">https://craftcms.com/docs/templating-overview</a></p>

<p><a href="http://withchief.com/blog/craft-cms-the-very-basics-of-templating" rel="nofollow noreferrer">http://withchief.com/blog/craft-cms-the-very-basics-of-templating</a></p>

<p>As far as how I organize my <code>scss</code> and <code>js</code> I just drop those into an assets folder like so:<a href="https://i.sstatic.net/B8rBo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/B8rBo.png" alt="JS setup[![][1]][1]"></a></p>

<p>I hope this helps! Craft is extremely flexible with almost no restrictions on what it can do.</p>

CC BY-SA 3.0
2017-05-22T22:22:06.643Z
How do you organize your style and script assets from within the template's folder? 

`/craft/templates/_js/jquery.js, /craft/templates/_css/bootstrap.scss`

Is that acceptable?
Jeff Wilkerson
CC BY-SA 3.0
2017-05-23T15:27:50.053Z
Updating my answer now.
Mark Busnelli Jr
CC BY-SA 3.0
2017-05-22T20:42:04.350Z
2017-05-23T15:32:03.197Z
2017-05-23T15:32:03.197Z
Mark Busnelli Jr
<p>Each Craft install is typically considered a discrete site, with its own design, information architecture, assets, etc.</p>

<p>This is why you might not be seeing information about "theming," per se.</p>

<p>However! Everything you need to start will be in <code>craft/templates</code> and <code>public</code>.</p>

<ol>
<li><code>craft/templates</code> is how you generate HTML. Files in here often correspond to your sections and routes, but can also get rendered statically, just based on where you put them and what they're named. <a href="https://craftcms.com/docs/routing" rel="noreferrer">Check out the Routing documentation</a> to decide how you want to set up your basic templates.</li>
<li><code>public</code> is the only folder in the installation that is accessible to the web, directly. All your CSS, JS, fonts, static images (i.e. a logo, icons), etc. will go. You can reference those files the same way you would a regular HTML file. Craft <a href="https://craftcms.com/docs/templating/tags" rel="noreferrer">has some tags to help you</a> with generating the proper URLs.</li>
</ol>

<p>These are two of the primary concepts that you'll need to grasp to get started displaying your content.</p>

<p>Be sure to check out the <a href="https://craftcms.com/docs/templating-overview" rel="noreferrer">Templating Overview</a> and click through the next few Docs pages. Once you understand <em>where</em> a template needs to be (and why), you can dig in to <a href="https://craftcms.com/docs/templating" rel="noreferrer">the expanded templating docs</a>.</p>

<p>One last (rather granular) note: Each type of content you define (<code>Section</code>s) that has a URL will ask you for an <em>Entry Template</em>. That path is within your <code>craft/templates</code> folder, and it'll automatically load the file when you visit that Entry's URL. (i.e. my "News" section might have <code>_news/post</code> as its <em>Entry Template</em>, which corresponds to <code>craft/templates/_news/post.twig</code>. The underscore prevents it from being directly accessed/rendered via <code>mydomain.com/news/post</code>.</p>

CC BY-SA 3.0
2017-05-22T22:09:44.840Z
Thank you! Yes I like the idea of not having "themes". I was just confused at how to handle various style and script assets. I was trying to search for anything about assets and templating, but only found resources about images and twig templates.  

Thank you for explaining the public folder and template tags. Every CMS handles "templates" just a tad bit differently, but conceptually, its all the same i reckon.
Jeff Wilkerson
CC BY-SA 3.0
2017-05-23T19:43:53.360Z
It sounds like you have a lot of flexibility, and may want to look for general front-end asset management strategies—my only advice is to keep your source files (i.e. Sass, Coffeescript/ES6, etc.) out of the public web root. Put those in, say, a `src` directory at the top-level of your project, and have them compile into `public/assets/{asset type}`. Best of luck! Join us in the Craft Slack team if you have further questions, and we'll help out.
August Miller
CC BY-SA 3.0
2017-05-22T20:33:26.313Z
2017-05-22T20:33:26.313Z
August Miller
<p>How do I find documentation explaining how to build a theme in Craft CMS? Where do I put my theme's assets, like my CSS and JS files, and how do I reference those assets in my Twig templates?</p>

<theme>
Where is the documentation for creating templates/themes?
# Where is the documentation for creating templates/themes?

(Asked by: username_0 on 2017-05-22)

How do I find documentation explaining how to build a theme in Craft CMS? Where do I put my theme's assets, like my CSS and JS files, and how do I reference those assets in my Twig templates?

**Tags:** theme

---

## 2 answers

### Answer by username_1 on 2017-05-22. Score: 2 | Accepted answer

Generally speaking, Craft doesn't care where those files live, but I generally put all assets like CSS/SCSS, JS, etc in my `craft/templates` folder. If you're using `gulp` then you would compile your files out to the `public` folder and link to them appropriately. If you're not compiling those, then they would need to live in the `public` folder.

You can read more about templating here:

<https://craftcms.com/docs/templating-overview>

<http://withchief.com/blog/craft-cms-the-very-basics-of-templating>

As far as how I organize my `scss` and `js` I just drop those into an assets folder like so:[![JS setup[![][1]][1]](https://i.sstatic.net/B8rBo.png)](https://i.sstatic.net/B8rBo.png)

I hope this helps! Craft is extremely flexible with almost no restrictions on what it can do.

> **Comments:**
> **username_0**: How do you organize your style and script assets from within the template's folder?   `/craft/templates/_js/jquery.js, /craft/templates/_css/bootstrap.scss`  Is that acceptable?  
> **username_1**: Updating my answer now.  

---

### Answer by username_2 on 2017-05-22. Score: 5

Each Craft install is typically considered a discrete site, with its own design, information architecture, assets, etc.

This is why you might not be seeing information about "theming," per se.

However! Everything you need to start will be in `craft/templates` and `public`.

1. `craft/templates` is how you generate HTML. Files in here often correspond to your sections and routes, but can also get rendered statically, just based on where you put them and what they're named. [Check out the Routing documentation](https://craftcms.com/docs/routing) to decide how you want to set up your basic templates.
2. `public` is the only folder in the installation that is accessible to the web, directly. All your CSS, JS, fonts, static images (i.e. a logo, icons), etc. will go. You can reference those files the same way you would a regular HTML file. Craft [has some tags to help you](https://craftcms.com/docs/templating/tags) with generating the proper URLs.

These are two of the primary concepts that you'll need to grasp to get started displaying your content.

Be sure to check out the [Templating Overview](https://craftcms.com/docs/templating-overview) and click through the next few Docs pages. Once you understand *where* a template needs to be (and why), you can dig in to [the expanded templating docs](https://craftcms.com/docs/templating).

One last (rather granular) note: Each type of content you define (`Section`s) that has a URL will ask you for an *Entry Template*. That path is within your `craft/templates` folder, and it'll automatically load the file when you visit that Entry's URL. (i.e. my "News" section might have `_news/post` as its *Entry Template*, which corresponds to `craft/templates/_news/post.twig`. The underscore prevents it from being directly accessed/rendered via `mydomain.com/news/post`.

> **Comments:**
> **username_0**: Thank you! Yes I like the idea of not having "themes". I was just confused at how to handle various style and script assets. I was trying to search for anything about assets and templating, but only found resources about images and twig templates.    Thank you for explaining the public folder and template tags. Every CMS handles "templates" just a tad bit differently, but conceptually, its all the same i reckon.  
> **username_2**: It sounds like you have a lot of flexibility, and may want to look for general front-end asset management strategies—my only advice is to keep your source files (i.e. Sass, Coffeescript/ES6, etc.) out of the public web root. Put those in, say, a `src` directory at the top-level of your project, and have them compile into `public/assets/{asset type}`. Best of luck! Join us in the Craft Slack team if you have further questions, and we'll help out.  

---

