=head1 Catalyst Advent - Day 23 - Static::Simple =head2 Introduction Static::Simple is a plugin that will help to serve static content for your application. By default, it will serve most types of files, excluding some standard Template Toolkit extensions, out of your B file directory. All files are served by path, so if B is requested, then B is found and served. =head2 Usage Using the plugin is as simple as setting your use line in MyApp.pm to: use Catalyst qw/Static::Simple/; and already files will be served. =head2 Configuring =over 4 =item Include Path You may of course want to change the default locations, and make Static::Simple look somewhere else, this is as easy as: MyApp->config->{static}->{include_path} = [ MyApp->config->{root}, '/path/to/my/files' ]; When you override include_path, it will not automatically append the normal root path, so you need to add it yourself if you still want it. These will be searched in order given, and the first matching file served. =item Static directories If you want to force some directories to be only static, you can set them using paths relative to the root dir, or regular expressions: MyApp->config->{static}->{dirs} = [ 'static', qr/^(images|css)/, ]; =item File extensions By default, the following extensions are not served: B. This list can be replaced easily: MyApp->config->{static}->{ignore_extensions} = [ qw/tmpl tt tt2 html xhtml/ ]; =item Ignoring directories Entire directories can be ignored. If used with include_path, directories relative to the include_path dirs will also be ignored: MyApp->config->{static}->{ignore_dirs} = [ qw/tmpl css/ ]; =back =head2 More information L --castaway