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

catlogjs

v0.1.10

Published

Static site generator, translate human readable text format(such as markdown) into html, with a lot of other functions

Downloads

99

Readme

Catlog

Build Status Bitdeli Badge

Introduction

Catlog is a static site generator. It allow users to use markdown syntax to write blog article and publish it with html format. Catlog has a inner test server to allow you see your blog after write it. It also support for self theme and plugin definition.

Live demo blog.cattail.me

Quick-start

First install catlog with npm:

$ npm install -g catlogjs

This will install catlog globally on your system so that you can access the catlog command from anywhere. Once that you can view help:

$ catlog -h

it will tell you how to use catlog.

Create a directory for your website, get inside of it, and initialize an empty catlog project:

$ mkdir my-website
$ cd my-website
$ catlog init

This creates a skeleton site with a basic set of templates.

Want to create an new blog?

$ catlog publish

then you will need to provide some info for it.

write your article name: 文章名称
choose article category: 选择已创建类别,或者创建新的类别(这会给你在网站上添加一个新的导航项)
input new permalink title: 固定链接,为了美观,请尽量使用英文
input author name: 文章作者名

when done, you will have a subdirectory in contents folder: contents/category_name/permalink_title.There will be a index.md and a meta.json file. The index.md is where you write your article, and the meta.json file holds some info of your article.

The catlog blog structure contain the meta info of articles, do not change the directory structure without knowning what it means. publish command will handle this properly for you.

If you already have a lot of markdown article files and want to migrate them into catlog blog structure, run:

$ catlog migrate <path> 

It will prompt lost meta information needed for every markdown files.

When you finish writing article and want to preview it on local server, you should run:

$ catlog preview [-s] [-a] 
	
options:
	
	-s [port]: start local server on port,the default port is 8080.
	-a: watch for file change and auto update
	--server [port]: the same effect as -s [port]
	--auto: the same effect as -a

Then you can build your site.

$ catlog build 

This generates your site and places it in the build/ directory - all ready to be copied to your web server!

Theme

environment

site

  • source
  • destination
  • theme_path
  • plugin_path
  • permalink_style
  • base_url
  • port
  • author
  • site_title
  • site_url
  • destination
  • theme
  • plugins
  • categories
  • posts

post

  • src
  • title
  • category
  • date
  • time
  • author
  • year
  • month
  • day
  • permalink
  • heading
  • content could have self-defined variables

Plugin

Catlog itself bring with three plugins:

In your website root directory, change settings.json plugins field. Following is a example configuration file

{
  "source": ".contents",
  "destination": "build",
  "permalink_style": "date",
  "base_url": "/",
  "about_url": "http://about.me/cattail",
  "port": "8081",
  "author": "CatTail",
  "site_title": "Catblog",
  "site_url": "http://blog.cattail.me",
  "description": "",
  "theme": "came",
  "plugins": {
    "ga": {
      "trackingID": "UA-41494270-1",
      "domain": "cattail.me"
    },
    "disqus": {
      "disqus_shortname": "cattail"
    },
    "qudian": {
      "auth_key_id": "1362799309",
      "auth_key_secret": "44fc9ea58e1697c85506d305a20dbfea"
    }
  }
}

TODO

  • 修改migrate呈现形式
  • 增加about等特殊页面的支持
  • 编写测试
  • 增加示例
  • 相册

Contributors

Developed when working at ©Qudian Tech Inc.