Skip to content

Commit

Permalink
Rename favicons.html to custom-head.html (jekyll#468)
Browse files Browse the repository at this point in the history
Merge pull request 468
  • Loading branch information
hszhakka authored Feb 17, 2020
1 parent 88ef462 commit 8b8177e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Refers to snippets of code within the `_includes` directory that can be inserted
- `footer.html` — Defines the site's footer section.
- `google-analytics.html` — Inserts Google Analytics module (active only in production environment).
- `head.html` &mdash; Code-block that defines the `<head></head>` in *default* layout.
- `custom-head.html` &mdash; Placeholder to allow users to add more metadata to `<head />`.
- `header.html` &mdash; Defines the site's main header section. By default, pages with a defined `title` attribute will have links displayed here.
- `social.html` &mdash; Renders social-media icons based on the `minima:social_links` data in the config file.

Expand Down Expand Up @@ -184,10 +185,12 @@ minima:
```
### Add your favicons
### Extending the `<head />`
You can *add* custom metadata to the `<head />` of your layouts by creating a file `_includes/custom-head.html` in your source directory. For example, to add favicons:
1. Head over to [https://realfavicongenerator.net/](https://realfavicongenerator.net/) to add your own favicons.
2. [Customize](#customization) default `_includes/favicons.html` in your source directory and insert the given code snippet.
2. [Customize](#customization) default `_includes/custom-head.html` in your source directory and insert the given code snippet.
### Enabling comments (via Disqus)
Expand Down
6 changes: 6 additions & 0 deletions _includes/custom-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% comment %}
Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons:

1. Head over to https://realfavicongenerator.net/ to add your own favicons.
2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet.
{% endcomment %}
6 changes: 0 additions & 6 deletions _includes/favicons.html

This file was deleted.

4 changes: 3 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- include favicons.html -%}
{%- seo -%}
<link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
{%- feed_meta -%}
{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}

{%- include custom-head.html -%}

</head>

0 comments on commit 8b8177e

Please sign in to comment.