# Github does not render my site correctly

**URL:** <https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157>\
**Category:** Uncategorized\
**Created:** [March 29, 2020, 9:49am UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157 "2020-03-29T09:49:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![psionman](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@psionman](https://talk.jekyllrb.com/u/psionman)\
**Post date:** [March 29, 2020, 9:49am UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/1 "2020-03-29T09:49:05Z")

</div>

I have a Jekyll site that I’ve uploaded to github. Everything works perfectly, except:

The menu-bar on github is picking up heading fields from the individual pages, and the heading is duplicated on the pages when they are rendered.

This is [the site](https://psionman.github.io/psionman_set/)

And this is how it looks on the local server

 ![Screenshot at 2020-03-25 08-55-11](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/e/e3a7d1bc23b1f7485722fe8b7e8943603636e3a6.png)

Can someone please help me fix it?

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 29, 2020, 8:10pm UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/2 "2020-03-29T20:10:11Z")

</div>

Aha. Jekyll is picking up the page title from the first heading on each page and using that to build the menu

So remove “WxPython from Scratch” from each page. Then will use the heading after it which seems to be more appropriate.

Even better is move data to frontmatter to make it easier to manage. So take out any h2 / ## etc tags from your pages and rather put the metadata at the top as

```auto
---
title: My title
layout: page
---

Page content 

```

And then create or update a layout file such that the heading appears on the page inside an h2 tag or similar

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 29, 2020, 8:14pm UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/3 "2020-03-29T20:14:05Z")

</div>

Also I see you have a bunch of files with post in the name. There is jekyll feature where you put posts in a posts folder (with a specific name format including the date) and then you can separate pages like About and Contact from posts which can appear as a list of blog posts on the Blog page or homepage as well as individual post pages. This means you have a super long nav bar.

You can add topics or categories to posts too to make them easy to group and find.

---

<div class="post-metadata">

**Author:** ![psionman](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@psionman](https://talk.jekyllrb.com/u/psionman)\
**Post date:** [March 30, 2020, 11:29am UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/4 "2020-03-30T11:29:45Z")

</div>

Thanks . I think

```
title: ""

```

sorted it

Mmmmm doesn’t explain while github gives a different result from local server

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [March 30, 2020, 2:39pm UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/5 "2020-03-30T14:39:24Z")

</div>

OK good.

Perhaps you have a Jekyll version later than Github’s 3.8.5 causing the difference?

---

<div class="post-metadata">

**Author:** ![kevdog](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/kevdog/32/2327_2.png) [@kevdog](https://talk.jekyllrb.com/u/kevdog)\
**Post date:** [March 30, 2020, 3:56pm UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/6 "2020-03-30T15:56:46Z")

</div>

I’m only going to throw out something here.

I don’t know how complex you want to make your Jekyll site, however you are going to find github pages unfortunately has a lot of limitations particularly if installing some different packages. I’m no expert in the matter but its really super annoying to the end user.

I still use Git to store all my files, but I switched from github pages to netlify to build and host the site. For me the change was fairly easy and things tended to render a lot better such as they do on the localhost as compared to github pages.

This is so far off topic I know, since I doubt your current problem has anything to do specifically with github pages.

---

<div class="post-metadata">

**Author:** ![psionman](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@psionman](https://talk.jekyllrb.com/u/psionman)\
**Post date:** [March 30, 2020, 4:38pm UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/7 "2020-03-30T16:38:54Z")

</div>

> [@MichaelCurrin](#):
>
> Perhaps you have a Jekyll version later than Github’s 3.8.5 causing the difference?

I’m using v 4.0.0 Can I downgrade?

---

<div class="post-metadata">

**Author:** ![kevdog](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/kevdog/32/2327_2.png) [@kevdog](https://talk.jekyllrb.com/u/kevdog)\
**Post date:** [March 30, 2020, 4:47pm UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/8 "2020-03-30T16:47:13Z")

</div>

You you can downgrade. In your Gemfile you probably have a line like:

```
gem "jekyll", "~> 4.0.0"

```

Just make it:

```
gem "jekyll", "~> 3.8.5"

```

And then run

```
bundle update
```

---

<div class="post-metadata">

**Author:** ![psionman](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@psionman](https://talk.jekyllrb.com/u/psionman)\
**Post date:** [March 31, 2020, 9:44am UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/9 "2020-03-31T09:44:45Z")

</div>

Thanks. Done it! Yet to test on github though

---

<div class="post-metadata">

**Author:** ![23Ruchil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/23ruchil/32/2509_2.png) [@23Ruchil](https://talk.jekyllrb.com/u/23Ruchil)\
**Post date:** [May 12, 2020, 8:41pm UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/10 "2020-05-12T20:41:27Z")

</div>

Hi, my site is being rendered without CSS. Possible to know why is this happening?

> **[Your awesome title](https://23ruchil.github.io/Blog/)**
>
> Write an awesome description for your new site here. You can edit this line in \_config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.

---

<div class="post-metadata">

**Author:** ![psionman](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@psionman](https://talk.jekyllrb.com/u/psionman)\
**Post date:** [May 13, 2020, 6:07am UTC](https://talk.jekyllrb.com/t/github-does-not-render-my-site-correctly/4157/11 "2020-05-13T06:07:00Z")

</div>

Well I’ve solved my problem. It all comes down to includes and I had to learn quite a lot about Jekyll before I got to it

In _-includes/header.html_ the following code appears

```
        {%- if my_page.title -%}
        ...
        {%- endif -%}

```

I simply removed the offending line printing the title which was causing all of the problems.

As my site is just static pages, I’m probably going to change to Sphinx/Netlify now as kevdog suggests. Already got some pages up and running successfully and, I think it’s simpler.

The Jekyll experience has been valuable as I’ve learned a lot, but I’m not sure it’s for me
