diff --git a/arctic/generics.py b/arctic/generics.py index aff2f7ab..496c0c36 100755 --- a/arctic/generics.py +++ b/arctic/generics.py @@ -109,6 +109,7 @@ def get_context_data(self, **kwargs): context["SITE_NAME"] = self.get_site_name() context["SITE_TITLE"] = self.get_site_title() context["SITE_LOGO"] = self.get_site_logo() + context["SITE_FAVICON"] = self.get_site_favicon() context["SIDEBAR_BACKGROUND"] = self.get_sidebar_background() context["SIDEBAR_COLOR"] = self.get_sidebar_color() context["SIDEBAR_ALT_COLOR"] = self.get_sidebar_alt_color() @@ -181,6 +182,9 @@ def get_page_description(self): def get_site_logo(self): return arctic_setting("ARCTIC_SITE_LOGO") + def get_site_favicon(self): + return getattr(settings, "ARCTIC_SITE_FAVICON", None) + def get_site_name(self): return arctic_setting("ARCTIC_SITE_NAME") diff --git a/arctic/templates/arctic/partials/head.html b/arctic/templates/arctic/partials/head.html index fc0924ef..0d6c14c0 100644 --- a/arctic/templates/arctic/partials/head.html +++ b/arctic/templates/arctic/partials/head.html @@ -5,6 +5,10 @@ +{% if SITE_FAVICON %} + +{% endif %} + {% block title %} {{ SITE_TITLE }} – {{ page_title }} diff --git a/docs/reference.md b/docs/reference.md index 6a129b64..c9dbd67c 100755 --- a/docs/reference.md +++ b/docs/reference.md @@ -81,6 +81,9 @@ if not provided, a default color will be used. String representing the foreground color of the sidebar, for example '#ffffff', if not provided, a default color will be used. +## `ARCTIC_SITE_FAVICON` +The url of favicon. + ## `ARCTIC_SITE_LOGO` The url of the logo to be displayed on every page, it will also be the link to