GitHub wiki directories

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.


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."


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 {namespace}-{page} scheme for namespacing.


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.. ).

Tags:

Wiki

Github