skelkit-docs
v1.0.1
Published
Convert README.md files into beautiful documentation websites.
Maintainers
Readme
📖 SkelKit Docs
Transform any Markdown file into a beautiful, responsive documentation website in seconds.
SkelKit Docs is a lightweight Node.js package that converts Markdown files into modern documentation pages with a built-in web server or seamless integration into your existing Express application.
✨ Features
- 📄 Render Markdown as a beautiful documentation website
- 🚀 Built-in HTTP server (zero configuration)
- 🔌 Integrate into existing Express applications
- 📱 Fully responsive layout
- 🧭 Automatic navigation sidebar
- 📑 GitHub Flavored Markdown support
- 🎨 Easy styling through CSS
- ⚡ Fast and lightweight
- 🌙 Modern documentation interface
Installation
npm install skelkit-docsQuick Start
Option 1 — Built-in Server (Recommended)
Simply provide your Markdown file.
node node_modules/skelkit-docs README.mdThe documentation website will automatically start at
http://localhost:3000Run on a different port:
PORT=8080 node node_modules/skelkit-docs README.mdOption 2 — Integrate into Your Existing Express Server
const express = require("express");
const { renderMarkdownFile } = require("skelkit-docs");
const app = express();
app.use("/docs", renderMarkdownFile("/", "README.md"));
app.listen(3000, () => {
console.log("Server running on http://localhost:3000");
});Your documentation will be available at
http://localhost:3000/docsLibrary Usage
Read a Markdown File
const { read } = require("skelkit-docs");
const markdown = read("README.md");Convert Markdown to HTML
const { mdToHtml, read } = require("skelkit-docs");
const markdown = read("README.md");
const html = mdToHtml(markdown);
console.log(html);Create a Documentation Server
const { renderMarkdownFile } = require("skelkit-docs");
const app = renderMarkdownFile("/", "README.md");
app.listen(3000);Navbar Configuration
const { setNavName, setNavBackground, setNavTextColor, setNavLinks, renderMarkdownFile } = require("skelkit-docs");
setNavName("My Docs");
setNavBackground("#1a202c");
setNavTextColor("#ffffff");
setNavLinks(
{ href: "/", text: "Home" },
{ href: "/docs", text: "Docs" },
{ href: "/about", text: "About" }
);
const app = renderMarkdownFile("/", "README.md");
app.listen(3000);API
read(filename)
Reads a file synchronously.
Parameters
| Name | Type | |------|------| | filename | String |
Returns
StringmdToHtml(markdown)
Converts Markdown into HTML.
Parameters
| Name | Type | |------|------| | markdown | String |
Returns
StringrenderMarkdownFile(route, filename)
Creates an Express application that serves your Markdown as a documentation website.
Parameters
| Name | Type | |------|------| | route | String | | filename | String |
Returns
Express ApplicationgenerateNavBar()
Generates the navbar HTML string.
Returns
StringsetNavName(name)
Sets the name displayed in the navbar.
Parameters
| Name | Type | |------|------| | name | String |
setNavBackground(color)
Sets the navbar background color.
Parameters
| Name | Type | |------|------| | color | String |
setNavTextColor(color)
Sets the navbar text color.
Parameters
| Name | Type | |------|------| | color | String |
setButtonBackground(color)
Sets the button background color in the navbar.
Parameters
| Name | Type | |------|------| | color | String |
setButtonTextColor(color)
Sets the button text color in the navbar.
Parameters
| Name | Type | |------|------| | color | String |
setButtonBorderColor(color)
Sets the button border color in the navbar.
Parameters
| Name | Type | |------|------| | color | String |
setNavLinks(...links)
Sets the navigation links for the navbar.
Parameters
| Name | Type |
|------|------|
| links | Array of Objects with href and text |
Customization
SkelKit Docs is fully customizable.
Simply edit styles.css to personalize the appearance.
Change Background Color
body{
background:#0f172a;
}Change Text Color
body{
color:#f8fafc;
}Change Heading Colors
h1{
color:#2563eb;
}
h2{
color:#3b82f6;
}
h3{
color:#60a5fa;
}Change Link Color
a{
color:#2563eb;
}Change Sidebar Width
.sidebar{
width:280px;
}Change Sidebar Background
.sidebar{
background:#111827;
}Change Content Width
.content{
max-width:900px;
}Change Font
body{
font-family:Inter,sans-serif;
}Change Code Block Style
pre{
border-radius:12px;
padding:18px;
}Add Your Own CSS
Simply modify
styles.cssor replace it with your own stylesheet.
Project Structure
project/
├── README.md
├── package.json
└── node_modules/
└── skelkit-docs/Example Workflow
README.md
│
▼
SkelKit Docs
│
▼
Beautiful Documentation Website
│
▼
Deploy AnywhereCompatibility
SkelKit Docs works with
- ✅ Standalone built-in server
- ✅ Existing Express.js applications
- ✅ Node.js 18+
- ✅ Local development
- ✅ VPS
- ✅ Dedicated servers
- ✅ Docker
- ✅ Nginx
- ✅ Apache
- ✅ Render
- ✅ Railway
- ✅ Fly.io
- ✅ AWS EC2
- ✅ Azure App Service
- ✅ Google Cloud Run
Requirements
- Node.js 18 or newer
- npm
License
MIT License
Author
Divyanshu Gupta
GitHub
https://github.com/divyanshugupta0/skelkit-docs
Support
If you find SkelKit Docs useful, please consider giving the repository a ⭐ on GitHub.
Contributions, issues, and feature requests are always welcome.
