Serving Static Resources
Table of Contents
Serving Static Resources
Lenya now serves static resources out of the box. Publications can either use these predefined mappings, or provide their own. The following MIME types are handled:
- CSS
- Javascript
- Images (GIF, JPEG and PNG)
- Shockwave Flash (*.swf)
To use the built-in matching, these resources need to be stored in the appropriate directories within a publication, and called with the proper URLs.
MIME Type | Prefix | Directory |
CSS | css/ | resources/css/ |
Javascript | javascript/ | resources/javascript/ |
Images | images/ | resources/images/ |
pdf/ | resources/pdf/ | |
Flash | flash/ | resources/flash/ |
An image would thus be called with <img src="images/logo.gif" /> You dont have to worry about absolute vs relative image paths as long as you use URLs that follow this pattern.