# Why are there differences between Jekyll on local server and github?

**URL:** <https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127>\
**Category:** Uncategorized\
**Created:** [March 25, 2020, 7:26pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127 "2020-03-25T19:26:08Z")\
**Posts on this page:** 10\
**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 25, 2020, 7:26pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/1 "2020-03-25T19:26:08Z")

</div>

I was attracted to Jekyll because it is a sold as a way to set up static websites on github.

I have some pages that work the way that I want them to on the local server, but when I upload to github work differently

1. The headings on _pages_ get shown in the menu-bar of github pages

2. images don’t appear

What could be the causes of such problems?

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 25, 2020, 8:15pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/2 "2020-03-25T20:15:21Z")

</div>

image and css issues are usually baseurl related - GH is serving from a subfolder if it is a project, so the path to anything has to have the project name in it.

share a link with a public page if you still have problems. I don’t understand issue #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 26, 2020, 7:46am UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/3 "2020-03-26T07:46:02Z")

</div>

Thanks. This is my (source) directory structure

```
.
├── 404.html
├── about.markdown
├── _config.yml
├── Gemfile
├── Gemfile.lock
├── index.md
├── _posts
│ ├── A2020-03-23-welcome-to-jekyll.markdown
├── _site
│ ├── 404.html
│ ├── about
└── wx_python
    ├── images
    │ ├── basic_frame.png
    ├── introduction.md
    ├── post01.md
    ├── post02.md
    ├── post03.md
    ├── post04.md
    ├── snippets
    │ ├── basic_frame.py
    └── wxpython_from_scratch.md

```

In my \_config.yml

```
baseurl: "/psionman_set" # the subpath of your site, e.g. /blog

```

To access an image I use the code

```
![](/wx_python/images/basic_frame.png)

```

It allows me download a snippet using the code

```
([raw\_frame.py](snippets/basic_frame.py))

```

This is at a similar place in the directory tree.

How do I need to change this?

A typical page is at [https://psionman.github.io/psionman\_set/wx\_python/introduction.html](https://psionman.github.io/psionman_set/wx_python/introduction.html)

The menu-bar is a list of pages which it has picked up from the header in each page: typically

```
## WxPython from Scratch

```

The header is also duplicated on the displayed page

this is what it should look like

 ![Screenshot at 2020-03-26 08-06-51](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/1/1045ff618adea606fb96bd8c28dbd213a1e4f3dc.png)

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 26, 2020, 4:32pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/4 "2020-03-26T16:32:50Z")

</div>

link to repo? dupe stuff is weird, not sure how the local site could be different than GH - need to see repo.

The image url you have: `/wx_python/images/basic_frame.png)` does not have the project name/baseurl in the path so you probably need to add that by prepending the baseurl - which is a bit of a pain to type each time. If you were hosting it thru your own domain you would not need it as the path would not include the sub folder/project name.

---

<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 26, 2020, 4:36pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/5 "2020-03-26T16:36:13Z")

</div>

Hi. What do you mean by repo?

This is the start of post01.md

```
---
layout: "page"
---

## WxPython from Scratch

### Getting started: the frame

Let's define a few terms used by wxPython:
```

---

<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 26, 2020, 4:43pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/6 "2020-03-26T16:43:21Z")

</div>

Thanks. That works for the images. Of course the local version is broken. Do I have a problem with my directory structure?

And the menu-bar is still a problem

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 26, 2020, 5:00pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/7 "2020-03-26T17:00:28Z")

</div>

repo - your project on GH so we can look at the code. There is something wrong with a layout or something.

How did you prepend the project name? if you hard coded the actual name then locally the path will be incorrect but would work on GH.

---

<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 26, 2020, 5:01pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/8 "2020-03-26T17:01:31Z")

</div>

Yes I did prepend it. Whats the correct way? (I’m a total newbie here :))

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 26, 2020, 5:06pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/9 "2020-03-26T17:06:05Z")

</div>

try:  
`{{ site.baseurl }}/wx_python/images/basic_frame.png`

---

<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 26, 2020, 5:31pm UTC](https://talk.jekyllrb.com/t/why-are-there-differences-between-jekyll-on-local-server-and-github/4127/10 "2020-03-26T17:31:09Z")

</div>

Great. That works perfectly.

How do I give you access to the repo?
