mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Restore simple configuration of favicon.ico (#1095)
Avoid the need to add a link to favicon,ico when editing `_includes/head_custom.html`, and avoid creating an invalid favicon link - Remove the content of `_includes/head_custom.html` - Add code to `_includes/head.html` to create a link to an existing favicon,ico - Add an explanation of favicon_ico to docs/configuration.md - Remove the example of `includes/head_custom.html` and add an explanation of what the `<head>` element automatically includes
This commit is contained in:
@@ -29,6 +29,15 @@
|
||||
<script src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{% for file in site.static_files %}
|
||||
{% if file.path == site.favicon_ico or file.path == '/favicon.ico' %}
|
||||
{% assign favicon = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if favicon %}
|
||||
<link rel="icon" href="{{ site.favicon_ico | default: '/favicon.ico' | relative_url }}" type="image/x-icon">
|
||||
{% endif %}
|
||||
|
||||
{% seo %}
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}" type="image/x-icon">
|
||||
|
Reference in New Issue
Block a user