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

blogd

v0.2.5

Published

Node Server providing an API to expose blog data from a formated github repository

Readme

Blogd

Blogd allow you to retrieve blog's posts and meta from a folder, a git repository or a remote zip and expose them via an API. It's useful when you want to manage a collaborative blog with github for example. Blogd is maintained by http://www.elao.com and is use at http://www.elao.com/blog. The content repository of the blog is located at http://www.github.com/elao/tech-blog.

Configuration

Add a config.js file (copy / past the config.js.dist for example). Or you can also define a blogd config key in your package.json file (or in ../../package.json file).

Example of config.js file

'use strict';

exports.port          = process.env.PORT || 5555;
exports.host 		 = '127.0.0.1';
exports.store         = 'memory'; // or memory
exports.outputFolder  = __dirname + "/content";
exports.backupFile    = __dirname + "/current.json";
exports.assetsToCopy  = [{
    from: exports.outputFolder + "/posts/images/",
    to:   __dirname + "/public/images",
    url: "/images/"
}];

exports.security = {
    rules: {
        guest:  {},
        admin:  {}
    },
    basic: {
        realm:    'Blogd Private Api',
        user:     'admin',
        password: 'private'
    }
};

exports.source = {
    type:        'zip',
    url:         'https://github.com/Elao/tech-blog/archive/master.zip'
}

Available configuration options:

API

Assets mapping

In your config, you can define mapped directories from your source, to a folder and an url. For example:

exports.assetsToCopy  = [{
    from: exports.outputFolder + "/posts/images/",
    to:   __dirname + "/public/images",
    url: "/images/"
}];

Blogd will copy the content of /posts/images/ from your repository, to the Blogd local directory /public/images and then map the /public/images/ folder to the url /images/ For example, if you have a file /posts/images/myimage.png in your repository, you'll be able to access the file to http://localhost:5555/images/myimage.png

Content structure

The content of the source must be structured this way (you can find an example at https://github.com/Elao/tech-blog)

##Users file: Must be at the root of the repo and named users.json

Example of users.json file:

[{
    "name":  "Vincent",
    "slug":  "vincent",
    "email": "[email protected]"
},{
    "name":  "Guewen",
    "slug":  "guewen",
    "email": "[email protected]"
}]

##Tags file: Must be at the root of the repo and be named tags.json It contains the allowed tags used in posts. If a post use a tag not referenced in these file, the tag will be ignored. Properties label and slug on tag objets are mandatory, but you can add other metas and you'll get them back through the API.

Example of tags.json file:

[
    {"label": "Symfony", "slug": "symfony"},
    {"label": "HTML/CSS", "slug": "html-css"},
    {"label": "Webdesign", "slug": "webdesign"},
    {"label": "Framework", "slug": "framework"},
    {"label": "Translation", "slug": "translation"},
    {"label": "Form", "slug": "form"},
    {"label": "Theming", "slug": "theming"},
    {"label": "Linux", "slug": "linux"},
    {"label": "Tips", "slug": "tips"},
    {"label": "Talk", "slug": "talk"},
    {"label": "PHP", "slug": "php"}
]

##Posts file: The post files must be placed in the /posts folder. Each post must have two files: a markdown file and a meta file.

For each post, you need to have 2 files in the /posts folder

  • The .md file that should contains the markdown content of the post
  • The .meta file that should contains the meta data for the article.

The two files must have the same name except the extension.

Example:

If your post is named "mysuperblogpost", you must have these two files in the /posts folder:

  • mysuperblogpost.md (hold the markdown content of the post)
  • mysuperblogpost.meta (hold the metas of the post)

##Post meta file The post meta file contains information about the associated blog post.

The metas are like this:

Additional metas will be exposed by the blogd api.

Example of a post meta file:

{
    "tags":	           		["Symfony2", "Toto", "Titi"],
    "title":				"My super post from a nice repository",
    "slug":					"my-super-post-from-a-nice-repository",
    "status":				"published",
    "meta_title":			"Imported post from a repository",
    "meta_description":		"A super amazing post about everything",
    "publish_by":"			[email protected]",
    "publish_at":			"2014-07-06"
}

TODO

  • Add more checks on data
  • Add pagination on /posts/:tag & /authors
  • Add a redis store