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

md-blog-generator

v1.1.3

Published

A simple, lightweight static blog generator that converts Markdown files into a styled HTML blog.

Readme

Markdown Blog Generator

A simple, lightweight static blog generator that converts Markdown files into a styled HTML blog.

Overview

Markdown Blog Generator is a command-line tool that transforms a directory of Markdown files into a fully functional static blog website. It features:

  • Simple, responsive design
  • Syntax highlighting for code blocks
  • Front matter support for metadata
  • Watch mode for automatic rebuilding on file changes
  • Clean, modern styling

Supported Languages

This project supports code highlighting for almost all popular programming and markup languages, such as: HTML, JavaScript, Python, Java, and much more. To view all supported languages, visit the following documentation of highlight.js library.

https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md

Prerequisites

  • Node.js
  • npm

Usage

Basic Usage

Install and run the tool:

npm install -g md-blog-generator

md-blog-generator

Or just use:

npx md-blog-generator

You'll be asked to provide:

  • Input directory: where your Markdown files are located
  • Output directory: where the generated HTML files will be saved

Watch Mode

To automatically rebuild your blog when Markdown files are changed:

md-blog-generator --watch
# or
md-blog-generator -w

You can also use:

npx md-blog-generator --watch
# or
npx md-blog-generator -w

Help

To see all available options:

md-blog-generator --help

Writing Content

File Structure

Place all your Markdown files in your input directory. Each file will be converted to a corresponding HTML page in the output directory.

Example structure:

my-blog/
├── posts/             # Input directory
│   ├── first-post.md
│   ├── second-post.md
│   └── third-post.md
└── public/            # Output directory (will be created)
    ├── index.html
    ├── first-post.html
    ├── second-post.html
    └── third-post.html

Front Matter

Each Markdown file can include YAML front matter at the top to specify metadata:

---
title: My First Blog Post
date: 2025-03-30
excerpt: This is a brief summary of my first blog post.
---

# Content starts here

This is the content of my blog post...

Supported front matter fields:

  • title: The title of the post (defaults to filename if not specified)
  • date: Publication date (used for sorting on the index page)
  • excerpt: A short summary displayed on the index page

Writing Markdown

The tool supports standard Markdown syntax plus:

  • Code blocks with syntax highlighting

    ```javascript
    function hello() {
      console.log("Hello, world!");
    }
    ```
  • Images

    ![Alt text](https://example.com/image.jpg)
  • Links

    [Link text](https://example.com)
  • Blockquotes

    > This is a blockquote

Customization

Styling

To customize the styles, modify the CSS in the template function in generator.js. The template uses CSS variables that can be easily changed:

:root {
  --primary-color: #3498db;      /* Main accent color */
  --secondary-color: #2c3e50;    /* Secondary accent color */
  --background-color: #f9f9f9;   /* Page background */
  --text-color: #333;            /* Main text color */
  --border-color: #eaeaea;       /* Border color */
  --code-bg: #f5f5f5;            /* Code background */
}

Template

To change the HTML structure, modify the template function in generator.js.

Examples

Basic Blog Post

---
title: Getting Started with JavaScript
date: 2025-03-28
excerpt: Learn the basics of JavaScript programming in this beginner-friendly guide.
---

# Getting Started with JavaScript

JavaScript is one of the most popular programming languages in the world. In
this guide, we'll cover the basics to get you started.

## Variables

You can declare variables using `let`, `const`, or `var`:

```javascript
let name = "John";
const age = 30;
var isStudent = true;
```

## Functions

Functions are reusable blocks of code:

```javascript
function greet(name) {
  return `Hello, ${name}!`;
}

console.log(greet("John")); // Outputs: Hello, John!
```

Common Issues

  • Error: ENOENT: no such file or directory: Make sure the input directory exists and is accessible.
  • No HTML files generated: Check that your input directory contains Markdown files (.md extension).