Markdown Wiki Engine
A lightweight wiki engine that renders markdown files as a navigable documentation site. Built to understand static site generation and file-based routing.
A lightweight wiki engine built to understand how static site generators work under the hood. It reads markdown files from a directory, generates a searchable documentation site with automatic navigation, table of contents, and cross-referencing. The project served as a learning exercise in file-based routing, MDX compilation, and static generation strategies.
Existing documentation tools (Docusaurus, GitBook) are feature-rich but opinionated. I wanted to understand the underlying mechanics — how markdown is compiled, how navigation trees are generated, and how search indices are built.
The project was specifically about understanding Next.js's static generation. Using getStaticPaths to map markdown files to routes was the core learning goal.
Rather than using next/mdx directly, I built a custom compilation pipeline using unified/remark/rehype to understand the transformation chain from markdown to HTML.
MDX compilation, file-based routing, and navigation tree generation.
Built client-side search index and automatic wiki-link detection.
Markdown files can reference each other in loops (page A links to page B, which links back to page A). The initial navigation generator entered infinite recursion. Solved by maintaining a visited set during tree traversal.
Successfully renders a 50-page documentation site with full-text search.
Navigation tree handles deeply nested content (up to 6 levels tested).
Contentlayer or next-mdx-remote would have saved significant development time. The custom compilation pipeline was educational but not reusable.
Understanding the markdown-to-HTML compilation pipeline is valuable knowledge for any web developer building content-driven sites.
Sometimes the most valuable outcome of a project is what you learn, not what you ship.