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

vuepress-plugin-wxshare

v0.0.3

Published

A vuepress plugin that can share content in WeChat

Downloads

4

Readme

vuepress-plugin-wxshare

说明

一个用于在微信中分享 vuepress 页面的插件。

本项目分为前端和后端。

前端

前端项目仅适用于 vuepress 2.x

安装

pnpm add vuepress-plugin-wxshare

使用

import wxshare from "vuepress-plugin-wxshare";

export default {
  plugins: [
    wxshare({
      host: "https://www.u2sb.com",
      server: "",
      imgUrl: "https://www.u2sb.com/assets/img/avatar.jpg",
      desc: "帅比网",
      directConnection: false,
    }),
  ],
};

后端

以 Linux 为例,下载并解压后端

修改配置文件,详见源码

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "UnixSocket": "./wx.share.sock",
  "Port": "13567",

  // pid文件 配合systemd使用 删掉这行注释
  "PidFile": "/run/wx.share.pid",

  // 下面是跨域配置 删掉这行注释
  "WithOrigins": [
    "blog.xxwhite.com",
    "*.u2sb.com",
    "*.xxwhite.com",
    "*.sm9.top"
  ],

  // 下面是域名白名单 支持正则表达式 删掉这行注释
  "WhiteListDomains": [
    "172.16.5.18",
    "^*xxwhite.com$",
    "^*u2sb.com$",
    "^*sm9.top$"
  ],

  // 必填 删掉这行注释
  "WxSdk": {
    "AppId": "",
    "AppSecret": ""
  }
}

测试运行

chmod +x ./Wx.Share
./Wx.Share

配置 systemd

[Unit]
Description=WxShare
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking

User=your_username
Group=your_groupname

PIDFile=/path/to/wx.share.pid
WorkingDirectory=/path/to/directory
ExecStartPre=/usr/bin/rm -f /path/to/wx.share.pid
ExecStart=/path/to/Wx.Share
ExecStartPost=/usr/bin/sleep 0.5
KillSignal=SIGTERM

Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

测试启动并添加到开机启动

配置 NGINX

server {
    listen 443 http3;
    listen 443 http2;
    server_name your_domain;

    ssl_early_data on;
    proxy_set_header Early-Data $ssl_early_data;
    ssl_protocols TLSv1.2 TLSv1.3;
    add_header Alt-Svc 'h3=":443"; ma=86400; h3-29=":443"; h3-28=":443";';
    ssl_certificate /home/mc/.acme.sh/s.cer;
    ssl_certificate_key /home/mc/.acme.sh/s.key;

    index index.html index.htm;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass "http://unix:/path/to/wx.share.sock";

        brotli_types text/plain application/xml application/json application/octet-stream;
        gzip_types text/plain application/xml application/json application/octet-stream;
    }
}