From df84c55f4cd04b460a38256893511c5aea219bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Romanowski?= Date: Mon, 1 Apr 2019 17:25:45 +0200 Subject: [PATCH] Add favicon support --- README.md | 14 ++++++++++++++ config.toml | 7 +++++++ templates/index.html | 4 ++++ 3 files changed, 25 insertions(+) diff --git a/README.md b/README.md index e9925c5..ad40bbe 100644 --- a/README.md +++ b/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). diff --git a/config.toml b/config.toml index 49188f5..ae8353c 100644 --- a/config.toml +++ b/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" diff --git a/templates/index.html b/templates/index.html index a577dae..67ec0f0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,6 +14,10 @@ {% endif -%} + {%- if config.extra.favicon %} + + {% endif -%} + {%- block extra_head %} {% endblock extra_head -%}