feat(wiki): hierarchical folder navigation with auto-generated sidebar #506

Closed
opened 2026-06-06 14:36:13 +00:00 by jmiller · 0 comments
Owner

Summary

Transform the wiki from a flat page list into a hierarchical folder-based structure where:

  1. Folders are treated as menu items in a sidebar navigation
  2. README.md (or index.md) inside a folder serves as the default start page for that section
  3. Auto-listing of files inside each folder means the homepage does not need to be manually updated when new pages are added
  4. Sidebar shows the folder tree structure as you navigate, expanding sections as you dive deeper

Current Behavior

The wiki is flat --- all pages exist at the same level. Navigation is either via manual links in page content or the page list. Adding a new wiki page requires manually updating the home page links.

Proposed Behavior

Folder Structure

Sidebar Navigation

A collapsible tree sidebar that:

  • Shows all folders as expandable sections
  • Lists pages within each folder
  • Highlights the current page
  • Auto-expands the section containing the current page
  • Is generated automatically from the wiki repo git tree (no manual config needed)

Auto-Listing

When viewing a folder README/index, automatically list all pages in that folder below the README content (similar to how repo home pages list files above the README).

URL Structure

  • -> home page
  • -> features/README.md
  • -> features/custom-fields.md
  • Backward compatible: existing flat URLs continue to work

Motivation

As MokoGitea adds more features, the wiki grows. A flat structure becomes unmanageable --- you have to manually maintain links on the home page, and there is no way to organize related pages into sections. GitHub has the same limitation; this would be a significant differentiator.


Authored by Jonathan Miller (@jmiller)

## Summary Transform the wiki from a flat page list into a hierarchical folder-based structure where: 1. **Folders are treated as menu items** in a sidebar navigation 2. **README.md (or index.md) inside a folder** serves as the default start page for that section 3. **Auto-listing of files** inside each folder means the homepage does not need to be manually updated when new pages are added 4. **Sidebar shows the folder tree** structure as you navigate, expanding sections as you dive deeper ## Current Behavior The wiki is flat --- all pages exist at the same level. Navigation is either via manual links in page content or the page list. Adding a new wiki page requires manually updating the home page links. ## Proposed Behavior ### Folder Structure ### Sidebar Navigation A collapsible tree sidebar that: - Shows all folders as expandable sections - Lists pages within each folder - Highlights the current page - Auto-expands the section containing the current page - Is generated automatically from the wiki repo git tree (no manual config needed) ### Auto-Listing When viewing a folder README/index, automatically list all pages in that folder below the README content (similar to how repo home pages list files above the README). ### URL Structure - -> home page - -> features/README.md - -> features/custom-fields.md - Backward compatible: existing flat URLs continue to work ## Motivation As MokoGitea adds more features, the wiki grows. A flat structure becomes unmanageable --- you have to manually maintain links on the home page, and there is no way to organize related pages into sections. GitHub has the same limitation; this would be a significant differentiator. --- *Authored by Jonathan Miller (@jmiller)*
Sign in to join this conversation.