From 880a323b27e1e43b4413f2c77c6b3c0bb889b4ae Mon Sep 17 00:00:00 2001 From: daudix Date: Wed, 18 Sep 2024 03:21:34 +0300 Subject: [PATCH] Allow setting favicon per page/section --- CHANGELOG.md | 1 + templates/partials/favicon.html | 28 ++++++++++++++++++++++++++++ templates/partials/head.html | 7 +------ templates/partials/nav.html | 6 +++--- 4 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 templates/partials/favicon.html diff --git a/CHANGELOG.md b/CHANGELOG.md index e0209d8..653c40e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `h1` with page/section title by default. - Add ability to set accent color per page/section. - Add ability to set default theme per page/section. +- Add ability to set favicon/emoji per page/section. - Add ability to set metadata card per page/section. - Add active state to footer's "Powered by" links. - Add active state to footnotes' go back button. diff --git a/templates/partials/favicon.html b/templates/partials/favicon.html new file mode 100644 index 0000000..6cdc839 --- /dev/null +++ b/templates/partials/favicon.html @@ -0,0 +1,28 @@ + + + + +{%- if page.extra.emoji_favicon or section.extra.emoji_favicon or config.extra.emoji_favicon %} + +{%- endif %} diff --git a/templates/partials/head.html b/templates/partials/head.html index c67cbc1..150990c 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -23,12 +23,7 @@ {%- endif %} - - - - {%- if config.extra.emoji_favicon %} - - {%- endif %} + {%- include "partials/favicon.html" %} {%- if config.generate_feeds and config.feed_filenames %} {%- for feed in config.feed_filenames %} diff --git a/templates/partials/nav.html b/templates/partials/nav.html index e911980..a7e07cd 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -115,10 +115,10 @@ {%- for feed in config.feed_filenames %}
  • - {%- if feed == "rss.xml" -%} - RSS - {%- elif feed == "atom.xml" -%} + {%- if feed == "atom.xml" -%} Atom + {%- else -%} + RSS {%- endif -%}