I have cloned one of my GitHub project's wiki locally, and I want to restructure the file system. By default different pages added to the wiki are all created in the parent directory:
/wiki
home.md
wiki_page_1.md
...
I want have a directory structure similar to this:
/wiki
/setup
setup_procedures.md
index.md
/development
index.md
tools.md
/images
front_page.png
I've tried to structure my wiki files similarly, but it's not working for the .md
files. However, it works for the images folder. Is there a way to make this work?
Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for.
You can't fork it directly on GitHub, but you can get Git access to it by going into the Git access tab of the wiki and you should be able to fork it on your local machine and edit it as much as you want (and even get updates to it!)
The Wiki pages are managed as a repository. So click on your repository, then on the left side click on Wiki. Finally on the upper right corner click on Clone Repository. There you will clear instructions on how to clone it correctly.
If GitHub is still using github/gollum, then, as explained in "How can you use subdirectories in a GitHub wiki checkout?", subfolders are not supported (or were buggy at the time of the fork).
More recent versions of gollum/gollum supports that organization, even though recent PR (Pull Requests) are still fixing issues around it (like PR 787).
The OP tsega adds in the comments:
tried to look into the Gollum wiki myself and it turns out you can organize your files under directories but that will not be how you access them.
Every page is accessed from the root of the wiki,e.g.
github.com/user/repo/wiki/file-name
notgithub.com/user/repo/wiki/directory/file-name
.The file names should be unique, and if you want to have proper titles they need to be capitalized and dashed (not underscored).
I've just hit the same problem and I've solved it (kinda) using a custom menu bar, and using regular Markdown, i.e. headers and links to create a folder structure.
In 2022 this is still not possible.
Please upvote this feature request 👈
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With