Browse Source

Add favicon support

master
Paweł Romanowski 5 years ago
parent
commit
df84c55f4c
  1. 14
      README.md
  2. 7
      config.toml
  3. 4
      templates/index.html

14
README.md

@ -303,6 +303,20 @@ use_full_hack_font = true
Also see [Hack's docs](https://github.com/source-foundry/Hack/blob/master/docs/WEBFONT_USAGE.md).
### Favicon
The theme supports adding a global favicon (applies to
all pages) to the site:
```toml
# Optional: Global favicon URL and mimetype.
# Mimetype defaults to "image/x-icon".
# The URL should point at a file located
# in your site's "static" directory.
favicon = "/favicon.png"
favicon_mimetype = "image/png"
```
All the configuration options are also described in
[`config.toml`](../blob/master/config.toml).

7
config.toml

@ -70,3 +70,10 @@ post_view_navigation_prompt = "Thanks for reading! Read other posts?"
# Switch this to true if you need full unicode support.
# Defaults to false.
use_full_hack_font = false
# Optional: Global favicon URL and mimetype.
# Mimetype defaults to "image/x-icon".
# The URL should point at a file located
# in your site's "static" directory.
# favicon = "/favicon.png"
# favicon_mimetype = "image/png"

4
templates/index.html

@ -14,6 +14,10 @@
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") }}">
{% endif -%}
{%- if config.extra.favicon %}
<link rel="icon" type="{{ config.extra.favicon_mimetype | default(value="image/x-icon") }}" href="{{ config.extra.favicon }}">
{% endif -%}
{%- block extra_head %}
{% endblock extra_head -%}
</head>

Loading…
Cancel
Save