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

miblog

v2.2.3

Published

A minimalistic static blog system for developers

Downloads

14

Readme

Miblog – another blog management system

Miblog is a minimalistic static blog management system made for developers. By static, understand that it's basically a command line tool which, from a given configuration file and some post files, will generate all a ready-to-deploy directory with HTML files, CSS, images, etc.

See demo at scastiel.github.io/miblog-demo.

Features

  • Minimalistic design with very clean typo.
  • Ultra-easy configuration.
  • No database required, write your articles in files.
  • No server-side process like Node.js, Ruby, PHP... generated content is static and ready to deploy!
  • Use Markdown to add formatting to your posts (GitHub-flavored Markdown).
  • Add images to your posts.
  • Disqus and Google Analytics integration (only if you want).

Requirements

Miblog is a command line tool availble as an npm package. That's why to use it, everything you need is Node.js, plus of course a web hosting service if you plan to make your blog available somewhere.

Quick start

You can start by forking the demo blog repository. Or, here is the right way to configure a new blog with Miblog from scratch.

First create a new directory on your system, initialize a package.json file (by running npm init), then install Miblog: npm install --save miblog.

In the package.json file, add a script which will be used to generate the content of your blog:

// ...
"scripts": {
  "generate": "miblog dist"
},
// ...

The dist parameter to the command miblog is the directory where you want the content to be generated.

Next create a miblog.conf.js file, which contains the basic configuration for your blog:

module.exports = {
    baseUrl: 'http://localhost:3000',
    title: 'My wonderful blog',
    postsDirectory: __dirname + '/posts'
};

Finally, create a posts directory, containing two files: 001-first-post.json and 001-first-post.md:

{
    "title": "This is the first post",
    "date": "2016-10-22T16:38:00.000Z"
}
This is your first post.

<!--readmore-->

This part will be visible only in single post view.

You can use *Markdown* to _write_ your posts!

That's it! Now let's generate your blog: npm run generate. Everything is generated in the dist folder; all you need to do now is running a webserver serving statically your dist directory.

To play with your blog locally, the easiest solution is to use the http-server Node module. Install it with npm install --save http-server, add a new script in your package.json: "start": "http-server dist -p 3000", then start the server with npm start.

Your blog is now available at http://localhost:3000 :)

Settings

baseUrl: the base URL of your blog, e.g. "http://example.com". It's used to create canonical URLs for the posts.

title: the title of your blog.

description: a short description of your blog, which will be shown below the title. You can use markdown in it.

footer: content that will be shown in the page footer. Put here license info, sharing links, contact info… You can use Markdown here too.

postsDirectory: the absolute path of the directory containing your posts. (Use __dirname to know the absolute path of index.js file.)

publicDirectory: the absolute path of a directory that will be served statically by the webserver. For instance, if you set it to __dirname + '/static' and the static directory contains an image.jpg file, then you'll be able to access this file at /public/image.jpg. Use it to store your images and put them in your posts with Markdown, e.g. ![My image](/public/image.jpg).

disqusId: the ID of your Disqus account if you want your visitors to be able to post comment on your articles. If your Disqus URL is http://my-blog.disqus.com, then your Disqus ID is my-blog.

analyticsId: the ID of your Google Analytics account, if you want to track visits on your blog.

Contribute

If you want to contribute you're welcome! Make some pull-request :)

License

Miblog is provided under GPL-v3.0.