Skip to content

Commit

Permalink
custom favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Singulariity committed Jan 17, 2025
1 parent cbf7e39 commit 5bd7f35
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions mkdocs/docs/discord.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Discord'da aramıza katılın
redirect_url: https://discord.gg/jyD5jn9Vpd
color: '#5865f2'
image: https://witch-love.com/img/discord.png
favicon_url: img/discord.ico
template: redirect.html
hide:
- toc
Expand Down
Binary file added mkdocs/docs/img/discord.ico
Binary file not shown.
12 changes: 12 additions & 0 deletions mkdocs/overrides/redirect.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{% extends "main.html" %}

{% block site_meta %}
{%- if page.meta -%}
{%- set split_content = super().split('<link rel="icon" href="') -%}
{{ split_content[0] }}
{%- set split_content = split_content[1].split('">', 1) -%}
<link rel="icon" href="{{ page.meta.favicon_url | default(config.theme.favicon) | url }}">
{%- for content in split_content[1:] -%}
{{ content }}
{%- endfor -%}
{%- endif -%}
{% endblock %}

{% block extrahead %}
{{ super() }}
{% if page %}
Expand Down

0 comments on commit 5bd7f35

Please sign in to comment.