gma / nesta

File Based CMS and Static Site Generator
http://nestacms.com
MIT License
902 stars 121 forks source link

A theme's assets aren't served in preference to the defaults #5

Closed gma closed 14 years ago

gma commented 14 years ago

If a theme's assets (e.g. image files in the public directory) share the name of some of the defaults, the default assets can be picked up from the public directory by a front end proxy server such as Nginx.

In production you can control which public folder is used for assets by configuring Nginx accordingly, but it's a bit fiddly. What about local development with Rack::Static, or on Heroku? Perhaps we need a way to prevent the Ruby server from reading stuff out of ./public.

gma commented 14 years ago

I've concluded that the best thing to do is to enable Rack::Static in the theme's app.rb file. Theme assets should therefore be dropped inside themes/theme-name/public/theme-name. It's documented on the main site.