This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

Hiding folders in Azure DevOps Code Wikis

Description

<img src="{att_link}azure-devops-3628645-3029870.png" href="{att_link}azure-devops-3628645-3029870.png" align="right" scale="50%">It is currently not possible to hide individual folders or files in an Azure DevOps Code Wiki. Folders and files beginning with a <c>.</c> are hidden by default, but you can't influence the structure other than by reordering pages with a <c>.order</c> file in an individual folder. The topic <a source="Microsoft Developer Community" href="https://developercommunity.visualstudio.com/t/hide-folders-that-do-not-contain-markdown-files/366069">Hide folders that do not contain Markdown files</a> discusses extending this functionality. I replied with the following: <hr> 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 <c>.</c>) 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 <i>not</i> 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: <ul> As suggested above, a <c>.wikiignore</c> file that allows globbing à la Git would be powerful (e.g., it would allow you to ignore all <c>Properties</c> folders in all project folders in .NET solutions). We could extend the <c>.order</c> file to support <c>!</c>, which would hide the folder or file from being displayed. This feature would technically also cover all use cases covered by a <c>.wikiignore</c> file, but would involve quite a bit more work to support (i.e., you would have to add a <c>.order</c> file to every <c>Properties</c> folder instead of just configuring once, in a root file). </ul>