Moya Favicon

This library serves classic favicons, which is a file called favicon.ico stored in the root of your site.

NOTE Serving a favicon in this way is supported by many browsers, but is somewhat deprecated in favor of an HTML link tag to specify the location of the favicon. Using this library is probably only necessary if you wish to support very old browsers.

Installation

Moya Favicon is built in to Moya and may be imported via its Python path as follows:

<import py="moya.libs.favicon"/>

You can install the library with the following:

<install name="favicon" lib="moya.favicon" mount="/"/>

Usage

The default settings simply serve a file called favicon.ico, which you should place in your /static/ directory.

Settings

Moya Static supports the following settings

fs = <LIST OF FILESYSTEMS>

This setting should be a list of filesystem names where Moya Favicon will look for the favicon.

iconpath = <SETTING FILENAME>

This should be set to the filename of the icon file to serve. Note that this only changes the file that Moya Static reads, the file will always be served as /favicon.ico/