WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Double <head> tag and title mistake #30

@teo330

Description

@teo330

Looking at the source code of the generated site I found there're two head sections.

I solved the problem by deleting

<head>
    <title>{{ site.author }}</title>
</head>

from the about.html, home.html and post.html files in the _layouts directory.
The right code should be written in /_includes/head.html

NOTE: I'm new to both GitHub and Jekyll and I didn't studied the Jekyll templating structure yet, however I noticed the shortcode {{ site.author }} actually shows the page title when in the wrong position (when there's the double head tag), but the same snippet (<title>{{ site.author }}</title>) in the right position (so when it's in the head.html file) shows the author name.
That's strange because there's not another title tag that overwrites it.
Ideas?

By the way I solved by changing the snippet from the one before to this one: <title>{{ page.title }}</title> (I tried site.title but then I realized I wouldn't print the page title:sweat_smile:)

P.S: I'm sorry if I mistaken or missed anything (in case please let me know) but, as said, I'm new to GitHub and I've no experience with (that's even the reason I don't try to pull the solution):innocent:
P.P.S: Thanks for this theme. It's pretty simple but amazing, for sure for a beginner who wants to learn and customize it:pray:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions