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

justshow

v0.0.2

Published

A pure html blog system based on nodejs cli.

Downloads

6

Readme

关于JustShow

一个基于node命令行工具构建的纯静态博客系统。

A pure html blog system based on node cli.

Install

npm install justshow -g

show <command>

Command

-v

显示当前程序版本号。

init <name>

在当前目录下初始化一个网站,name仅作为网站目录名称,因此name只能包含字母数字和下划线。

start

先用cd定位到网站目录下,然后使用show start启动网站,用于本地预览。

可以在后面使用-p参数,自定义服务端口号,例如:

show start -p 8823

如果要结束,直接使用Ctrl+C终止该命令的运行。

build

生成网站所有静态html文件(除404页面)。生成好的文件位于网站目录下的builds文件夹中。

location

如果node的当前工作目录为一个网站,则将显示当前网站的完整路径。

listsite

列出本机上所有通过init命令创建的网站及其位置。

unlink [name]

彻底删除一个网站,删除之后不可恢复。

Custom

网站模板文件位于网站的template目录下,可以通过直接修改模板文件来自定义网站样式。

index.html

首页。

list.html

列表页和分类列表页。

article.html

文章页。

single.html

单页。

404.html

404错误页,仅用于本地预览。

data

模板使用ejs渲染,因此您可以在模板中使用以下数据。例如:

<!--显示网站标题-->
<%=blog.title%>

data.blog

config.json中blog部分的内容,如网站标题、关键字、描述等。

data.cate

所有的分类信息,即cates.json中保存的内容。

data.page

根据页码获取到的列表页信息。

  • total: 总页数
  • index: 当前页码
  • list: 列表数据
  • prev: 上一页的链接
  • next: 下一页的链接

data.article

根据文章别名获取文章内容。

data.single

根据单页别名获取单页内容。

resource

与模板有关的css、js和图片文件都放在template目录下的resource文件夹中,这个位置是固定的,不能更改。否则,在访问生成的静态html文件时,会导致这些文件的路径不正确。

uploads

文章中使用的附件,需要放到builds\uploads目录下,否则无法正确获取。