Page.title shown even if not used in frontmatter on Github, fine locally

This should be a GH support request but I wasn’t able to reach it recently, so I hope it’s fine to ask/share here:
I’m facing a strange problem with a website on github pages, a preview is at redtide.github.io/elements/.
While locally works fine (at least on 2 different machines), the result of the homepage on GH appears with 2 H1 headers, so the page title is shown twice, though I haven’t added a page.title in the frontmatter in index.md by purpose. The code in default.html layout should show both page.title and site.title only if the former is present, otherwise show only site.title. How is it possible?

Your default layout doesn’t need any H elements. See these are commented out anyway.

The content section will put in the content from index.md etc.

If index.md has this

---
---
# my title

Then that will become your H1 on your rendered page.

Check your gems and jekyll version locally matches those locked on GH pages

The current branch for gh-pages is gh-pages-wip, it’s a simple code that works already on another website, I use the page.title for both content H1 headings and browser window title, the index is an exception.
If I don’t miss something else, all features I use are based on gh-pages versions listed in that page (see Gemfile).

Okay I see.

Your layout file looks fine.

You said the issue is on GH Pages only. So then make sure to merge from gh-pages-wip to the branch configured in your Settings. GH won’t serve your wip branch. Make a PR to your master or docs or gh-pages branch and merge it.

And maybe delete all the unneed branches you got when you forked as you have a lot to shift through.

Thank you for digging into this.
Recently GH has enabled gh-pages also on custom branches, so I’m serving them there.

Aha. Thanks didn’t know.

I think this your problem then. Your Homepage has 2x H1 and the others pages are fine.

The content for your homepage has H1 in the content but no title in metadata.
https://raw.githubusercontent.com/redtide/elements/gh-pages-wip/docs/index.md

So I’d say just remove your # value from index.md.

The title variable is blank so it is falling back to use a value from config.
So leave title out as is or set it yourself on index.md

the point is that it should work, I did a workaround already but I want to know why on GH does that, because if I can’t trust GH pages I would build the pages on a CI instead praying things works.