GitHub wiki directories

Does the wiki that installs with a GitHub repo support directories? Our wiki is cluttered with pages, and we are looking for a way to organize them better.

We tried pulling the repo, creating local directories, and moving things around, but when committed back, the wiki didn’t pick up the changes.

  • How to mirror Github and VS Online?
  • jenkins git plugin cloning every time
  • Added pod files and pushed. How to undo? how to use gitignore in Xcode & github?
  • How to find the new location of a repository after a rename
  • Jenkins, Git Hub Pull Request Builder is 1 commit behind
  • Remove and ignore all files that have an extension from a git repository
  • Adding self-signed SSL certificate without disabling authority-signed ones
  • Cannot remove submodule from Git repo
  • Committing Files Back to GitHub for Windows
  • Git commit ERROR: Repository invalid
  • Can I create more than one repository for github pages?
  • Showing a GitHub project page only under custom subdomain, never via folder path
  • 5 Solutions collect form web for “GitHub wiki directories”

    I was having the exact same issue and tried variants of what you tried. Nothing stuck. Asked GitHub support about it and received a reply that essentially said “No, but we’ll let the developers know that people are interested in this feature.”

    So the short answer is “No”, and the long answer is “No, but maybe in the future.”

    Actually, it looks like github added support for directories recently.

    I was able to do the following:

    • Move an existing markdown file to a new directory.
    • Create a new markdown file in an existing directory (created in the former step).
    • Create a new markdown file in a new directory.

    In all cases, the existing pages were still there and new pages were added.

    The one constraint that remains is that your file names must be unique. If you have more than one file with the same name, only one of them will show up in the wiki (I’m not sure which.. ).

    The github wiki (aka Gollum) does use directories but not in the way you may expect.

    The documentation on the Gollum wiki could use some work but this is what I have figured out mostly via testing.

    • All files appear in the root of the wiki no matter where they are placed in the repo.
    • _Header, _Footer and _Sidebar files are per-directory, but inherited if there is
      none present in a child folder.
    • File links can be relative to the source file (keep your files with your content).

    So, if you want directories for namespacing you are out of luck. Consider using the NS-Page scheme for namespacing.

    It’s not the an ideal solution but the workaround would be to create a custom sidebar where you create a table of contents with links to your pages. I find this to be better than folders anyway because it allows you to have a link to a single page under multiple hierarchies.

    Actually, there is still a limitation. Yes, you can add 1 level (so, 1 subfolder). But that’s it! I refactored my whole documentation layout, creating multiple levels of subfolders for organisation, but that was a no-go.


    I must say: I’m appalled by this Gollum thing. I’m surprised Github even picked it up.

    Git Baby is a git and github fan, let's start git clone.