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

hexo-online-server

v1.1.10

Published

hexo在线编辑,发布文章

Downloads

8

Readme

hexo-online-server

本插件已实现以下功能:

  • 在线新建,编辑,删除post和page(默认路径)
  • hexo clean,hexo server,hexo deploy
  • 源码同步

需求

  • Node.js >= 10.0
  • Hexo 4.X(只测试了4.X)
  • Git
  • mac系统close server功能无法使用(我没有mac设备,无法测试)

准备工作

  • 源码托管到Git仓库(建议使用私人仓库)
  • 配置好git, 确认可以使用以下命令进行同步:
    • git pull
    • git add --all .
    • git commit -m "..."
    • git push

使用

安装

npm install hexo-online-server -S

配置

  1. 新建config.json文件, 内容如下:

    {
        "indexPath": "/", // 自定义主页路径, 以"/"结尾
        "port": 4001, // http监听端口
        "wsPort": 4002, // websocke监听端口
        "secret": "", // 用来签名session ID cookie,https://www.npmjs.com/package/express-session#secret
        "user": "", // 登录用户名
        "passwordHash": "", // 密码加密后的字符串
        "autoSave": 300000, // 编辑文章时自动保存时间, 单位:ms, 0为不自动保存
        "noticeUrl": "", // 当有用户登录时向`此链接+message`发送get请求,留空则不通知
        "pull": ["git pull"], // 同步到git命令
        "push": ["git add --all .","git commit -m 'update'","git push"], // 从到git同步命令
        "ssl": false, // 是否启用SSL
        "private": { // 启用ssl需配置此项
            "key": "", // SSL证书key路径
            "crt": "" // SSL证书路径
        }
    }

    上面的注释要删掉!

  2. config.json文件保存到你的博客目录以外的地方, 在_config.yml中添加:

    onlineConfigPath: '../config.json' #`config.json`文件路径
  3. 使用以下命令获取加密密码, 将得到的passwordHash添加到config.json文件:

    hexo bcrypt 你的密码
  4. 运行hexo online, 浏览器打开http://localhost:4001/

更多

示例

LICENSE

MIT