Skip to content

Commit

Permalink
Merge 4458443 into d4ecbf9
Browse files Browse the repository at this point in the history
  • Loading branch information
VolodiaKhl committed Dec 18, 2018
2 parents d4ecbf9 + 4458443 commit 4654e64
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arctic/generics.py
Expand Up @@ -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()
Expand Down Expand Up @@ -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")

Expand Down
4 changes: 4 additions & 0 deletions arctic/templates/arctic/partials/head.html
Expand Up @@ -5,6 +5,10 @@
<meta name="description" content="">
<meta name="author" content="">

{% if SITE_FAVICON %}
<link rel="shortcut icon" href="{% static SITE_FAVICON %}"/>
{% endif %}

<title>
{% block title %}
{{ SITE_TITLE }} – {{ page_title }}
Expand Down
3 changes: 3 additions & 0 deletions docs/reference.md
Expand Up @@ -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
Expand Down

0 comments on commit 4654e64

Please sign in to comment.