jlong / serve

Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps). Serve is meant to be a lightweight version of the Views part of the Rails MVC. This makes Serve an ideal framework for prototyping Rails applications or creating simple websites. Serve has full support for Rails-style partials and layouts.
http://get-serve.com
Other
836 stars 90 forks source link

Support for linking a CSS file outside the serve "Root" #7

Closed rubytastic closed 14 years ago

rubytastic commented 14 years ago

Would it be possible to add a feature to add linking to a CSS file that is outside the Serve Root folder?

Example: /home/my_site/ cd /home/my_site serve

Then link a CSS file inside /home/css/mycss.css

I could not make this work with several link tactics, not even inserting a file:// which seems strange. Any suggestion on this?

jlong commented 14 years ago

This is not considered desirable because it would make resources available on your computer that are not explicitly marked for delivery. Your site root is where the files are that are available for download.

What are you trying to accomplish? Could you use a symlink to make the file appear in the root of your Serve project? Perhaps a script could copy it there?

rubytastic commented 14 years ago

Hi Jlong,

Indeed I resolved this with a symlink. I have 1 central location for all my public files that I symlink to several projects ( also projects that use the same for example admin backend) this works the best for us, however a symlink was the best option so this one can be closed. Your right on the resources outside serve dir.