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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ssr-md

v1.0.9

Published

1. 全局安装 ```shell npm i ssr-md -g ```

Readme

带密码验证的文档编辑器

使用node搭建服务器(静态项目无法对文档进行有效的保护)

使用方式一(全局安装)

  1. 全局安装
npm i ssr-md -g
  1. 创建项目文件夹,任意名称,例如mymd,命令
mkdir mymd
  1. 进入文件夹
cd mymd
  1. 初始化项目
ssr-md init

可带参数p(path),例如

ssr-md init -p C:\\
  1. 运行
ssr-md start

可带参数p(path),例如

ssr-md start -p C:\\

使用方法二(局部/项目中安装)

  1. 新建项目文件夹
mkdir mymd
  1. npm初始化并安装包
npm init
npm i ssr-md --save
  1. npx运行ssr-md的init(参数同上)
npx ssr-md init
  1. npx运行ssr-md的start(参数同上)
npx ssr-md start

效果如下图所示

image

md文件可以文件嵌套

  • 比如跳转链接/mds-haha,就是对应【md文件根目录/haha.md文件】

  • 比如跳转链接/mds-tech--index,就是对应【md文件根目录/tech/index.md文件】

那么我们就可以在markdown文件中设置链接进行文档的跳转,推荐在主md文件下设置其他md文件的链接目录

ssr-md.config.js配置解释

| key | type(类型) | Description(描述) | Default(默认) | |--------------|------------------|-----------------------------------------|-------------| | app_port | number | 服务监听的端口号 | 8080 | | app_screct | string | cookie生成所用安全码 | 'app_sercrect1' | | app_name | string | 登录页名称 | '我的文档' | | logo_src | string | 登录页logo | "" | | favicon | string | 网站图标 href | "favicon.ico" | | max_levels | number | 最大标题层数,设置为null则不限制层数,层数限制从h1开始,既如果只有h2,h3,h4且设置了三层,那么只有h2和h3会被设置为标题 | 3 | | mds_dir | string | md目录,默认mds | 'mds' | | index_md | string | 首页md,默认index | 'index' | | need_password | boolean | 是否需要密码,才能访问 | true | | pass_expire | string | 可用天和小时,例如'day','hour','30days','12hours','2days'... 设置cookie过期时间 | 'day' | | markdown_theme | string | md主题,文件路径对应static下的css文件 | 'themes/github-markdown' | | highlight_theme | string | 代码高亮主题,来自highlight.js主题 | 'highlight/styles/vs2015.min' | | static_fold | string | 你的静态文件资源站,不要将项目根目录作为静态资源站,会很危险哦 | '' | | custom_css | string | md页的自定义css地址(可以是字符串也可以是字符串数组),如果要使用自定义css,则需要设置static_fold(静态资源文件夹),并将css文件放到static_fold对应的文件夹下 | '' | | custom_hi_css | string | 登录页的自定义css地址(可以是字符串也可以是字符串数组),如果要使用自定义css,则需要设置static_fold(静态资源文件夹),并将css文件放到static_fold对应的文件夹下 | '' | | custom_js | string | md页的自定义js地址(可以是字符串也可以是字符串数组),如果要使用自定义js,则需要设置static_fold(静态资源文件夹),并将js文件放到static_fold对应的文件夹下 | '' | | custom_hi_js | string | 登录页的自定义js地址(可以是字符串也可以是字符串数组),如果要使用自定义js,则需要设置static_fold(静态资源文件夹),并将js文件放到static_fold对应的文件夹下 | '' | | admin_password | string | 管理员密码,可以进行密码管理,通过修改.passwords文件,必须有管理员cookie | '' |

可用markdown_theme主题如下: | key | 描述 | |--------------|------------------| | themes/github-markdown | github markdown样式 | | themes/github-markdown-dark | github markdown黑暗样式 | | themes/github-markdown-light | github markdown明亮样式 | | themes/jasonm23-dark | 手机端样式 | | themes/jasonm23-foghorn | 手机端样式 | | themes/jasonm23-markdown | 手机端样式 | | themes/jasonm23-swiss | 手机端样式 | | themes/markedapp-byword | pc/手机端样式 | | themes/roryg-ghostwriter | pc/手机端样式 | | themes/sspai | pc/手机端样式 | | themes/thomasf-solarizedcssdark | pc/手机端样式 | | themes/thomasf-solarizedcsslight | pc/手机端样式 |

查看帮助(init命令和start命令)

  1. ssr-md init --help (全局安装:npx ssr-md init --help)

  2. ssr-md start --help (全局安装:npx ssr-md start --help)

部署

  1. 由于是ssr,那么服务器一定要有node环境
  2. linux命令行运行: 执行ssr-md start(需要配置ssr-md的环境变量或者找到ssr-md所在目录)