themesfaviconckan

How to change favicon in CKAN


I am having trouble with this seemingly simple task.. Can someone help please?

I have uploaded .ico file to /usr/lib/ckan/default/src/custom_theme/ckanext/custom_theme/public

Changed value in setting file (development.ini) Tried making base.html for the custom theme, with

{% ckan_extends %}
{% block links -%}
   <link rel="shortcut icon" href="http://site.address/favicon.ico" />
{% endblock -%}

For file path, I have tried both relative and literal.

I can access the icon file if I type in address of it in web browser.


Solution

  • This is what works for me*:

    1. Define favicon filename in your .ini eg. ckan.favicon = favicon.ico
    2. Upload file to ../ckan/default/src/ckanext-[your_theme]/ckanext/[your_theme]/public
    3. Reload apache
    4. Clear Browser cache
    5. Reload site in Browser

    This assumes CKAN >2.5 and following instruction on creating a custom theme