Tim,

Chris Parrish, with whom I've spoken privately, is working on an 
extension that will allow you to manage CSS and JavaScript separate from 
the page sitemap and have them be cached in some reasonable place so 
they can be served by your web server.  In the meantime, you can create 
pages in the sitemap that have special layouts that specify their 
content type. It means an extra hit to Radiant to get the CSS or JS, but 
it's a good interim solution.

To accomplish this, I would create a child of the homepage called 
"Stylesheets", and create a layout for it like this:

Name: CSS
Content type: text/css
Content: <r:content />

Then create child pages of "Stylesheets" that are your individual 
stylesheets, modifying the slug to end in ".css" if you desire.

You can do the same for JS.

Cheers,

Sean

Timothy Jones wrote:
> Greetings,
>
> I'm just ramping up on Radiant.   Apologies if I've missed this in a  
> FAQ somewhere, but I'm looking for some recommendations on managing  
> these types of assets on a Radiant-based site.  I found a mailing list  
> thread from 2006, but it didn't seem to have a conclusion.
>
> With non-Radiant sites I have Apache serve up these static files,  
> bypassing Rails entirely.  What are the recommended best practices  
> with Radiant?  I'd like to manage them through the web interface, so  
> that other folks don't have to deal with Subversion, deployment, etc.
>
> Do folks generally just embed the CSS and JavaScript in a layout and  
> serve it dynamically?  And caching?
>
> What about images (icons, backgrounds, etc.)?  I'd like a way to  
> upload and delete them from a browser, again to avoid Subversion and  
> deployment hassles.  It looks like the Gallery extension might work  
> for this.  Any other recommendations?
>
> Thanks!
>
> Tim Jones
> Barbary Codes and Data
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>   

_______________________________________________
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to