mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-16 06:13: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:
@@ -167,34 +167,13 @@ The (optional) `text-delta` class makes the heading appear as **Contents**{:.tex
|
||||
|
||||
This content appears at the bottom of every page's main content. More info for this include can be found in the [Configuration - Footer content]({{ site.baseurl }}{% link docs/configuration.md %}#footer-content).
|
||||
|
||||
### Custom Head and Favicon
|
||||
### Custom Head
|
||||
|
||||
`_includes/head_custom.html`
|
||||
|
||||
Any HTML added to this file will be inserted before the closing `<head>` tag. This might include additional `<meta>`, `<link>`, or `<script>` tags.
|
||||
|
||||
Note that by default, this file has the following contents:
|
||||
|
||||
{% raw %}
|
||||
|
||||
```html
|
||||
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}" type="image/x-icon">
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
#### Example: Custom Favicon
|
||||
{: .no_toc }
|
||||
|
||||
To add a custom favicon, create `_includes/head_custom.html` and add:
|
||||
|
||||
{% raw %}
|
||||
|
||||
```html
|
||||
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}" type="image/x-icon">
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
If *no favicon* is desired, one needs to have a *blank* `_includes/head_custom.html`.
|
||||
The `<head>` tag automatically includes a link to an existing favicon if you set `favicon_ico` to the corresponding path in your configuration, or if the path to the favicon is `/favicon.ico`.
|
||||
|
||||
### Custom Header
|
||||
|
||||
|
Reference in New Issue
Block a user