Skip to content
Timothy Kempf edited this page Oct 14, 2013 · 16 revisions

Assets can be any kind of static file, generally things like javascript, css, images, and favicons. Any time your site needs to use files that aren't pages, partials, or layouts, you'll be putting them into /assets.

Creating Assets

You add assets to your website simply by placing them into the /assets directory. Anything placed in this directory will be served back with the same path it is placed in. For instance, if you add /assets/favicon.ico, it will be served up at http://localhost:8080/favicon.ico when your site is running.

In order to use these assets within your pages, simply include them with the absolute path to the location they're served up at. For instance, if you have an image in /assets/images/header.png, you can use it in your markup like so: <img src="/images/header.png" />.

Styles

  • What is Sass?
  • How do I structure my stylesheets?
  • How do I use my stylesheets in my pages?

Scripts

  • What is RequireJS?
  • How do I structure my scripts?
  • How do I use my scripts in my pages?
  • What are script best practices?

Other assets

  • How do I use other assets in my pages?

Clone this wiki locally