A lightweight, static documentation app built with Vite + React + TypeScript, designed to serve Showpass API/SDK documentation using a markdown-driven content loading.
π Live Demo:dev.showpass.com
git clone https://github.com/showpass/api-docs-guide.git
cd api-docs-guide
npm install
npm run dev- The
ContentManageris the main interface for loading docs. - It uses
DocsLoader, a static markdown loader that imports.mdfiles at build time via a custom Vite plugin. - It also parses
##headings to extract a table of contents.
useContent()fetches markdown content + auto-extracts headings for TOC.- Manages
isLoading,error, andtableOfContentsstate.
DynamicDocPageserves as the main container, routing to appropriate content types.ContentPagerenders markdown viareact-markdownwith custom syntax highlighting.DocLayoutorchestrates the three-panel layout: navigation sidebar, main content, and table of contents.Navigationcomponent provides collapsible sections with active state indicators.TableOfContentsauto-generates from markdown headings with smooth scroll behavior.ApiExamplesrenders multi-language code snippets with copy functionality.
docs-app/
βββ application/ # Business logic layer (ContentManager)
βββ infrastructure/ # DocsLoader, vite-plugin-md-import
βββ ui/ # React components, layout, and content rendering
βββ data/ # Markdown content files (.md)
Deployed automatically to GitHub Pages using gh-pages.
- π Markdown as source of truth
- βοΈ React + Vite for blazing-fast UI
- π Custom TOC & syntax highlighting
- π¦οΈ Built-in API Example block (multi-language)
- π§Ό Modular design & UI separation
π₯ Maintained by Showpass Dev Team