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

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?

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.

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

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

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.

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:

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

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.

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

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

Great. That works perfectly.

How do I give you access to the repo?