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

brunch-blog

v3.0.0

Published

A static blog compiler for brunch

Downloads

2

Readme

Brunch Blog Plugin

npm install brunch-blog --save-dev

You may be saying to yourself... OMG, why another static blog utility?

Brunch didn't seem to have one, and I like brunch.

Features

  • [X] markdown => static HTML under ./public/blog

  • [X] tags => static HTML under ./public/tags

  • [X] Disqus => simply add your Disqus shortname to config.plugins.blog.site

  • [X] Twitter => add your username to config.plugins.blog.twitter

  • [X] RSS => generates an RSS feed at ./public/rss.xml

  • [X] metadata => Posts can be written with metadata that you can integrate with your own custom templates

  • [X] drafts => drafts work by adding draft: true to a post's metadata header

  • [X] syntax highlighting => done at compile time with the awesome highlight.js

  • [X] moment.js helper => moment.js helpers are included in the template layer, so you can easily work with dates

  • [ ] pagination => WIP

This plugin is for generating a static blog quickly and seamlessly with your regular Brunch workflow.

It comes with a few sensible defaults, and will install the necessary - pug templates to quickly prototype a blog

By default posts live in the ./blog directory and not ./app/blog

Templates also live in ./templates and not ./app/templates because templates in your app directory are assumed to be SPA templates (ala Dust.js or what have ye) and not for static assets.

Writing a blog post

Writing a blog post is generally simple and utilizes an optional YAML metadata header

---
tile: some post
draft: true
publishDate: 2016-07-15
tags: awesomesauce, awesomepossum, epic
---

Some amazingly well written content here!

all key values in the metadata header section are passed into your pug templates on render and require no special work from you.

Custom helpers

Since brunch uses a brunch-config.js file, you can add helpers by simply requiring them and adding them to the site key

Config

Brunch_Blog.defaults = {
  // input folder where your Markdown files live.
    inDir         : "blog"
  // the public folder where the blog lives at
  , outDir        : "blog"
  // the folder in the app root where templates live
  , templatesDir  : "templates"
  // things you want to configure for compile time
  , site          : {
      title       : "Blog'o'Brunch"
    // used for permalink generation
    , url         : "https://www.example.com"
    , disqus      : null
    , twitter     : null
    , github      : null
    // RSS options from the `rss` module
    , rss         : {
        generator : "Brunch"
      , length    : 20
    }
  }
}