diff --git a/site/_docs/themes.md b/site/_docs/themes.md index 988f6ebd..c7d6d574 100644 --- a/site/_docs/themes.md +++ b/site/_docs/themes.md @@ -27,6 +27,7 @@ Jekyll themes set default layouts, includes, and stylesheets, that can be overri Jekyll will look first to your site's content, before looking to the theme's defaults, for any requested file in the following folders: +* `/assets` * `/_layouts` * `/_includes` * `/_sass` @@ -68,6 +69,12 @@ Theme layouts and includes work just like they work in any Jekyll site. Place la For example, if your theme has a `/_layouts/page.html` file, and a page has `layout: page` in its YAML front matter, Jekyll will first look to the site's `_layouts` folder for a the `page` layout, and if none exists, will use your theme's `page` layout. +### Assets + +Any file in `/assets` will be copied over to the user's site upon build unless they have a file with the same relative path. You may ship any kind of asset here: SCSS, an image, a webfont, etc. These files behave just like pages and static files in Jekyll: if the file has [YAML front matter]({{ site.baseurl }}/docs/frontmatter/) at the top, then it will be rendered. If it does not have YAML front matter, it will simply be copied over into the resulting site. This allows theme creators to ship a default `/assets/styles.scss` file which their layouts can depend on as `/assets/styles.css`. + +All files in `/assets` will be output into the compiled site in the `/assets` folder just as you'd expect from using Jekyll on your sites. + ### Stylesheets Your theme's stylesheets should be placed in your theme's `/_sass` folder, again, just as you would when authoring a Jekyll site. Your theme's styles can be included in the user's stylesheet using the `@import` directive.