8

I have a simple site hosted on GitHub Pages. It is a public repository, just using the standard default template with default settings and such. It is being published directly from the root.

Essentially, everything is in the default state as per the official Github Pages tutorials. I just want to show a sidebar for my table of contents.

note : before you mark this duplicate, please note that I have spent a lot of time looking at other questions, but most of them talk about customising sidebar, hiding and showing. So, those questions already somehow got the sidebar working. Mine is about displaying the sidebar itself which seems to be not mentioned anywhere.

I am thinking, I am missing something very obvious line of code which should be added/enabled somewhere in my repository.

The repository is here - https://github.com/Jay-study-nildana/Tutorials

Jay
  • 2,648
  • 4
  • 29
  • 58
  • What have you tried so far? Have you checked the doumentation (https://jekyllrb.com/tutorials/navigation/)? – The Otterlord Aug 15 '20 at 13:42
  • Thats the thing. I dont know Jekyll. I just know Github Pages. I apologise if I am being too lazy if I have to study an entire framework just to get a sidebar. I am about to decide if I should migrate my content over to Wordpress but thought I will post a question here to see if there a quick way to do this. – Jay Aug 16 '20 at 08:51

1 Answers1

7

The default templates for Github Pages don't include sidebars - they are minimal by design. There are a few ways to go, and they all involve investing time into understanding Jekyll and themes:

  1. Use a Jekyll theme that already has sidebars (all themes work with Github Pages)
  2. Modify github-pages-minimal from the repo here - demo here
    • Set the theme to github-pages-minimal
    • Download the file _layouts/default.html from the forked repo and place in your repo in the same location.
    • Add more pages - as can be seen in the demo
    • Note: This will override the theme file, as per the Jekyll theme documenation
    • Note2: The index page will not appear in the list of files
johnml1135
  • 4,519
  • 3
  • 23
  • 18
  • I will give this a go and see if it helps out the next time I sit down to update the website. – Jay Jun 02 '21 at 04:44