|<<>>|32 of 275 Show listMobile Mode

Hiding folders in Azure DevOps Code Wikis

Published by marco on

 It is currently not possible to hide individual folders or files in an Azure DevOps Code Wiki. Folders and files beginning with a . are hidden by default, but you can’t influence the structure other than by reordering pages with a .order file in an individual folder.

The topic Hide folders that do not contain Markdown files (Microsoft Developer Community) discusses extending this functionality.

I replied with the following:


There are a lot of good suggestions here.

Changing the name of the folder or file in order to hide it (e.g., by prepending the name with .) is not a practical solution. Wikis based on, e.g., .NET solutions cannot just change the names of folders that would be empty in the Wiki.

Although I think that hiding empty folders by default seems like a good idea, I also understand that clicking an empty folder shows the UI that allows a user to create a page for an empty folder, so hiding that folder would also remove functionality from the online UI.

I think that many code-based Wikis wouldn’t mind losing this functionality, but we probably need a top-level Code Wiki option here where you can decide whether to show or hide empty folders by default.

That takes care of the default behavior, which would cover a lot of use cases for “cleaning up” the wiki’s structure.

However, if you elect not to hide folders by default, or if you just want to hide another file or folder, how can we support that requirement? I would suggest two mechanisms:

  • As suggested above, a .wikiignore file that allows globbing à la Git would be powerful (e.g., it would allow you to ignore all Properties folders in all project folders in .NET solutions).
  • We could extend the .order file to support !, which would hide the folder or file from being displayed. This feature would technically also cover all use cases covered by a .wikiignore file, but would involve quite a bit more work to support (i.e., you would have to add a .order file to every Properties folder instead of just configuring once, in a root file).