Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sidebar on GitHub Pages

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

like image 436
Jay Avatar asked Oct 15 '22 01:10

Jay


1 Answers

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)
    • Good themes for documentation, some of which include sidebars.
  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
like image 120
johnml1135 Avatar answered Oct 20 '22 23:10

johnml1135