Skip to main content

Easily add shortcut icons to any wagtail site.

Project description

Wagtail Favicon

Easily add shortcut icons to any wagtail site. Upload a .png image from a wagtail settings page and wagtail-favicon will resize it and add provide markup to your pages via a template tag.

Version 0.3.0 is for Wagtail versions 3+.


Installation & Setup

Install with pip

pip install wagtail-favicon

or

poetry add wagtail-favicon

Add to Django installed apps

INSTALLED_APPS = [
    #...
    'wagtail.contrib.settings'  # <-- ensure you have wagtail settings loaded 
    'wagtail_favicon',
]

Add routes to app.urls

from wagtail_favicon.urls import urls as favicon_urls

urlpatterns += [
    path('documents/', include(wagtaildocs_urls)),
    path('search/', search, name='search'),
    path('', include(wagtail_urls)),

    path('', include(favicon_urls)),  # <------ add urls to existing urls
]

Once you've completed setup you will now be able to access the folloing urls:

Add template tag to tag in templates/base.html

{% load favicon_tags %}
  <html>
    <head>
        {% favicon_meta %}
    </head>

Edit Settings

Go to Wagtail Admin >> Settings >> Favicon

Configure settings

For best results use a transparent png at 1024 x 1024.
Ideally pre optimised with a tool like tinypng.com.

Screenshot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail_favicon-0.3.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

wagtail_favicon-0.3.0-py2.py3-none-any.whl (7.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file wagtail_favicon-0.3.0.tar.gz.

File metadata

  • Download URL: wagtail_favicon-0.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for wagtail_favicon-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0b90dbd28da864172c90ba2fafb72068086e6c22fee34ca530d35990dfd50637
MD5 cceb5b397bc82eb416b980c0508a803d
BLAKE2b-256 7467d5aa3c2075ba672379a178210fdbab498d6882f3b5996e8c71079bfac657

See more details on using hashes here.

File details

Details for the file wagtail_favicon-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_favicon-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4dc8b25026aa31cd18523061e2aa83e198bcc779c24e25f00061dfb68b9e8b87
MD5 85b71dc1314fb3ce8036300d512dac14
BLAKE2b-256 ee8945155c34ab4cd47b1d558d75887234fa851b2f79545c144a7478f400e7a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page