You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding _includes/head.html file does not add anything to the header.
I also modified index.md
---
layout: home
---
<head>{% include head.html %}</head>
Still no luck. It is said in the documentation, that themes out of the box provide this functionality. Is there something going wrong that I can't see?
The text was updated successfully, but these errors were encountered:
yerenutku
changed the title
_includes/head.html does not includes header
_includes/head.html does not include header
Dec 28, 2024
Hi! I would need to look at the content of your _includes/head.html file to see exactly what you are trying to do, but here are a few thoughts.
First, you mention you're trying to add a header, but what you seem to be trying to add is an html head. And you are adding it to the content of index.md, but in doing so you're placing it inside the html body. This will not work.
Second, the theme already includes an html head (correctly placed outside the body). You can see it in the _layouts/default.html file, which specifies the base layout of every webpage. Take a look:
The homepage replaces {{ content }} on line 25 with the code included in _layouts/home.html. This code reads the information provided as part of the _data/json.yml file to render the json block. It ignores the content of index.md. The only thing it reads from index.md is the front matter. This is why anything you add there will never show up.
If you show me the content of your _includes/head.html file, I'll be able to tell you how to best achieve what you're trying to achieve.
Adding _includes/head.html file does not add anything to the header.
I also modified index.md
Still no luck. It is said in the documentation, that themes out of the box provide this functionality. Is there something going wrong that I can't see?
The text was updated successfully, but these errors were encountered: