Skip to content

Commit

Permalink
Merge ed6b15f into ae2c76a
Browse files Browse the repository at this point in the history
  • Loading branch information
VolodiaKhl committed Dec 14, 2018
2 parents ae2c76a + ed6b15f commit 9297e38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arctic/generics.py
Original file line number Diff line number Diff line change
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", "/static/favicon.ico")

def get_site_name(self):
return arctic_setting("ARCTIC_SITE_NAME")

Expand Down
2 changes: 2 additions & 0 deletions arctic/templates/arctic/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<meta name="description" content="">
<meta name="author" content="">

<link rel="shortcut icon" type="image" href="{% static SITE_FAVICON %}"/>

<title>
{% block title %}
{{ SITE_TITLE }} – {{ page_title }}
Expand Down
3 changes: 3 additions & 0 deletions docs/reference.md
Original file line number Diff line number Diff line change
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. It will will be displayed on all pages next to site title.

## `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 9297e38

Please sign in to comment.