Can I get a list of wiki pages in GitLab?

Viewed 3140
3 Answers

Note; if this list is to facilitate a TOC (Table of content) for navigation purpose, you now have GitLab 13.5 (October 2020), which comes with:

Deep-level wiki navigation

In GitLab 13.5, along with the release of group wikis, we have another huge improvement in how to view and navigate the file structure of a wiki.

Currently, it’s very difficult to see where you are or understand the structure of a wiki if you have multiple folder levels. This makes it difficult to navigate, find pages, and mentally map your information.

With this release, we’ve introduced wiki deep nesting in the sidebar so you can see all of your pages and navigate accordingly.

https://about.gitlab.com/images/13_5/cdybenko-wiki-deep-nesting.png -- Deep-level wiki navigation

See Documentation and Issue.

So there's now a GitLab Wiki API available which does everything I need:

https://docs.gitlab.com/ce/api/wikis.html

It can be used something like this:

https://gitlab.example.com/api/v4/projects/:project_id/wikis?with_content=1&private_token=yourtokenhere

Possibly not what you wanted (and a bit late) but if you have modified your Sidebar (i.e. _sidebar) you can make a copy of it and then delete it.

You could also add link:pages[List all pages]

to your home page. That might avoid, somehow, the 500 you get from pages.md

Related