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

@lexho111/plainblog

v0.8.5

Published

A tool for creating and serving a minimalist, single-page blog.

Readme

Plainblog

Plainblog is a simple blog generator to help you to set up and to maintain a minimalistic single-page blog. You can add new articles directly in the browser. Your data will be stored by default in two file called bloginfo.json and articles.txt.

Installation

npm install @lexho111/plainblog

Quick Start

import Blog from "@lexho111/plainblog";

const blog = new Blog();
blog.title = "My Blog";
blog.style = "body { font-family: Arial, sans-serif; } h1 { color: #333; }";
blog.password = "mypassword"
await blog.init();

await blog.startServer();

Now you can open your blog in your webbrowser on http://localhost:8080. Login via the login link in the navbar to begin with adding new articles, the password is 'admin'.

or with the BlogBuilder

import { BlogBuilder } from "@lexho111/plainblog";

const blog = new BlogBuilder()
  .withTitle("Mein Blog")
  .withStyle("body { font-family: Arial, sans-serif; } h1 { color: #333; }")
  .withPassword("mypassword")
  .build();
await blog.init();
await blog.startServer({ httpPort: 38080, httpsPort: 38443 });

More Features

add a header photo

To add a headerphoto to your blog simply name it "headerphoto.jpg" and put it in the public folder.

change view engine

You can put your own angular theme in the public folder.

const blog = new BlogBuilder()
...
.withFrontend("angular")
.build();

set a Database Adapter

connect to a sqlite database

import { SqliteAdapter } from "@lexho111/plainblog";
const blog = new Blog();

const sqliteAdapter = new SqliteAdapter({
  dbname: "blog",
});
blog.setDatabaseAdapter(sqliteAdapter);

await blog.init();
await blog.startServer();

connect to a postgres database

import { PostgresAdapter } from "@lexho111/plainblog";
const blog = new Blog();

const postgresAdapter = new PostgresAdapter({
  dbname: "blog",
  username: "user",
  password: "password",
  host: "localhost",
});
blog.setDatabaseAdapter(postgresAdapter);

await blog.init();
await blog.startServer();

use different ports

import Blog from "@lexho111/plainblog";

const blog = new Blog();
blog.title = "My Blog";
await blog.init();

await blog.startServer({
  httpPort: 38080,
  httpsPort: 38443,
});

set an API to fetch data from an external database

import Blog from "@lexho111/plainblog";

const blog = new Blog();
blog.setAPI("http://example.com:5432/blog")
blog.setStyle("body { font-family: Arial, sans-serif; } h1 { color: #333; }");
await blog.init(); // load data from database

await blog.startServer();

The API should respond to GET-Requests (http://example.com:5432/blog) with json like this:

{
  "title": "My Remote Blog",
  "articles": [
    {
      "title": "Welcome to the API Server",
      "content": "This content is served from a separate API server.",
      "createdAt": "2026-01-12T11:21:55.561Z"
    }
  ]
}

Post requests should look like:

curl -X POST http://example.com:5432/blog  -H "Content-Type: application/json" -d "{\"title\": \"My new Article.\", \"content\": \"This is the content.\"}"

provide custom style sheets

const blog = new Blog();
blog.title = "My Blog";
blog.style = "body { font-family: Arial, sans-serif; } h1 { color: #333; }";
blog.password = "mypassword";
blog.stylesheetPath = "path/to/my/styles.css";

await blog.startServer();

use sass compiled stylesheets

import * as sass from "sass";
import fs from "node:fs";

const compiled = sass.compile( "stylesheets/styles.scss");
fs.writeFile("stylesheets_compiled/styles.css", compiled.css, (err) => {
  if (err) console.error(err);
});
const blog = new Blog();
blog.stylesheetPath = "stylesheets_compiled/styles.css";
blog.title = "My Blog";
await blog.init();
await blog.startServer();

print your blog articles in markdown

blog.print()