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 🙏

© 2024 – Pkg Stats / Ryan Hefner

bumble

v3.0.1

Published

A very simple blog

Downloads

2,052

Readme

bumble

A very simple markdown blog module

  • Serve markdown + yaml text files from configurable directory
  • Provide date-based archives
  • Adds Gravatar based on Author email
  • Read Tumblr URLs and 301 Redirect
  • Comes with simple, default templates and styles (in the example folder).
  • Uses hapi

Add the module to your app

npm install bumble
var Hapi = require('hapi');
var config = require('./bumbleConfig.json');

var server = new Hapi.Server('0.0.0.0', 3000 || process.env.PORT);

server.views({
    engines: { jade: 'jade' },
    path: 'views',
});

server.route({
    method: 'get',
    path: '/css/{path*}',
    handler: { directory: { path: 'public/css' } }
});

server.route({
    method: 'get',
    path: '/js/{path*}',
    handler: { directory: { path: 'public/js' } }
});

server.pack.require({ 'bumble': config }, function (err) {
    if (err) throw err;

    server.start(function () {
        console.log('bumble running on the port ' + server.info.port);
    });
});

The above should enable you to quickly run bumble from a docker instance.

Check out the full example for some simple default templates and styles.

Set your defaults in bumbleConfig.json

{
  "blogTitle": "Name of blog",
  "blogSubtitle": "Here's a tag line",
  "blogAuthor": "Blog Author",
  "blogAuthorEmail": "[email protected]",
  "blogBio": "One day, I decided to write a blog. This is the story of that blog.",
  "siteUrl": "http://example.com",
  "rssUrl": "http://example.com/feed/rss",
  "postDir": "posts",
  "blogHome": "/",
  "maxPosts": 10,
  "introPostWords": 100,
  "maxRelated": 5,
  "randomRelated": true,
  "browserCache": 3600000,
  "labels": ["blog", "http"]
}

maxPosts will set the maximum number of posts available on the main page and RSS feed.

introPostWords will truncate the opening paragraphs at 100 words, including at least the opening paragraph, and never cutting off a line mid-sentence.

maxRelated limits the number of related posts shown in a single post view.

randomRelated determines whether related posts should be shuffled or not. (If false, this will instead list your maximum of related posts in order of recency.)

blogHome will accept routes like / or /blog or /somethingelse.

labels can be a string or an array, or not provided at all. Please see Hapi API docs for more info on labels

Put markdown files in the blog directory (or whichever you've chosen in postDir)

If you add to the metadata (1) a proper timestamp to the date field in metadata, and/or (2) a hyphenated version of the url name to the slug field, then (respectively of which you add) it doesn't matter what you name the markdown files.

Alternatively, to automatically date and slugify your urls, name your files in this format:

YYYY-MM-DD-this-is-the-name-of-the-post.md

Adding metadata:

Just include a simple section of YAML at the header of each post, fenced in with three dashes and using these keys:

---
date: 2013-06-02 22:04:39 GMT
slug: well-yep-another-post
tags: sample, example
title: Well, yep, another post!
---

Who uses bumble?

If you're using bumble, submit a pull request and add yourself to this list. :)

Contributors