rz-glyph-cli
v1.0.0
Published
Zero-dependency MDX documentation compiler and local preview server.
Readme
🌀 Glyph: Zero-Dependency Documentation Compiler & Local Preview Server
Glyph is a minimal, blazing-fast, static-site documentation engine designed for developers. It converts directories of raw Markdown and MDX files into premium, responsive developer hubs with client-side search.
📂 System Architecture
┌─────────────────────────┐
│ Markdown/MDX Source │
│ (docs/ directory) │
└────────────┬────────────┘
│
Compile (V8)
│
┌────────────▼────────────┐
│ Static HTML Output │
│ (dist/ directory) │
└────────────┬────────────┘
│
Local Hosting
│
┌────────────▼────────────┐
│ Glyph Dev Server │
│ (localhost:3000) │
└─────────────────────────┘🚀 Key Features
- Instant Compilation: Built in vanilla JS with minimal dependency overhead. Compiles documentation pages in under 50ms.
- Local Fuzzy Search: Generates a local search index on-the-fly, giving users instant results without needing external search APIs (like Algolia).
- GitHub-Style Alerts: Supports native
[!NOTE],[!TIP],[!WARNING], and[!IMPORTANT]blockquotes, rendering them as modern callout cards. - Dev Server & Hot-Reloading: Watches the source directory for saved edits and automatically triggers builds, instantly updating the local preview.
🛠️ Quick Start
1. Install Dependencies
npm install2. Compile Documentation
npm run buildThis compiles the raw documents in docs/ to static html outputs inside the dist/ directory.
3. Run the Development Preview Server
npm run devOpen http://localhost:3000 in your browser to view the documentation hub. Saving changes inside docs/ will trigger automatic rebuilding!
💻 CLI Commands
Run the compiler CLI locally:
- Build static documentation:
node bin/compiler.js build - Start dev server:
node bin/compiler.js dev [port]
⚙️ Configuration & Frontmatter
Every page inside docs/ should start with a YAML frontmatter block to establish ordering, page titles, and meta descriptions.
Example frontmatter block:
---
title: "Getting Started"
description: "Learn how to configure your Glyph documentation pipeline."
order: 2
---