npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dilemmagx/minidoc

v1.1.0

Published

A lightweight, powerful Markdown documentation generator with advanced code block features.

Readme

@dilemmagx/minidoc

Minidoc is a lightweight Markdown-to-HTML documentation generator designed for code-heavy projects. It features advanced code blocks, file inclusion, GFM alerts, and native Mermaid diagram support.

Features

  • Advanced Code Blocks: Sticky line numbers, table layout, and copy buttons.
  • File Inclusion: Include specific line ranges from source files directly into your documentation.
  • Mermaid Support: Native rendering of Mermaid diagrams with zoom, pan, and source view toggling.
  • GFM Alerts: GitHub-flavored markdown alerts (Note, Tip, Important, Warning, Caution).
  • Clean Typography: Optimized for readability with responsive design.
  • Collapsible Sections: Organize content with collapsible details blocks.

Install

npm install @dilemmagx/minidoc

CLI Usage

minidoc build <input-file> [options]

Options

  • -o, --output <path>: Specify the output HTML file path.
  • -t, --title <title>: Set the HTML page title (default: "Minidoc").
  • -v, --verbose: Enable verbose logging.
  • --no-copy: Disable the copy button on code blocks.

Example

minidoc build docs/index.md -o docs/index.html --title "My Documentation"

Syntax Guide

File Inclusion

Include code snippets from other files using the {{ ... }} syntax.

{{ "filePath", startLine, endLine, [displayStartLine], [isCollapsible], [defaultCollapsed], [enableTitle], [customTitle], [wordWrap] }}

Parameters:

  1. filePath (string): Path to the source file (relative to cwd).
  2. startLine (number): Starting line number (1-based).
  3. endLine (number): Ending line number (1-based).
  4. displayStartLine (number, optional): Line number shown in the gutter.
  5. isCollapsible (boolean, optional): Enable collapsible block.
  6. defaultCollapsed (boolean, optional): Start collapsed.
  7. enableTitle (boolean, optional): Show a title header.
  8. customTitle (string, optional): Custom title text.
  9. wordWrap (boolean, optional): Override global wrap setting.

Examples:

{{ "src/index.ts", 1, 10 }}
{{ "src/core.ts", 50, 80, 50, true, true, true, "Core Logic" }}

Mermaid Diagrams

Minidoc supports Mermaid diagrams out of the box. Use the mermaid language fence.

```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```

Features:

  • Zoom & Pan: Use mouse wheel to zoom, drag to pan.
  • Source View: Toggle between the rendered diagram and the source code.
  • Copy: Copy the Mermaid source code to clipboard.

GFM Alerts

Standard GitHub Flavored Markdown alerts are supported.

> [!NOTE]
> This is a note.

> [!TIP]
> This is a helpful tip.

> [!IMPORTANT]
> This is crucial information.

> [!WARNING]
> Proceed with caution.

> [!CAUTION]
> This action can have negative consequences.

License

GPL-3.0